Jump to content
Fórum Script Brasil
  • 0

Pegar Banco Q Esta Num Nivel Superior..


slipknot

Question

tem um sistema q esta dividido em duas partes.....

essa aki é o ex de tree q tenho..

-Pasta1

--Projeto1

--Pasta2(BD)

---Arquivo de BD

--Pasta3

--Projeto2

entaum..eu preciso q o Projeto 2 pegue o caminho do BD q esta dentro da pasta 2...

quero q pegue pelo App.Path porque vaiu ser um software q usara em LanHouses;;;

abraços...

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

olha cara eu consegui assim...

'Variáveis a serem Usadas
    Dim str_path As String
    str_path = App.Path
    '----------------------------------------------------
    'Abrindo Conexao com o Banco
        For int_x = Len(str_path) To 0 Step -1
            If Mid(str_path, int_x, 1) = "\" Then
                str_path = Mid(str_path, 1, int_x)
                Exit For
            End If
        Next int_x
    str_conexao = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & str_path & "\bd\bc_sistema_ACTIVE.mdb;Persist Security Info=False"
    conn.Open str_conexao
    '----------------------------------------------------

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...