Home All Groups Group Topic Archive Search About

VB6 front end to Access 97 database

Author
20 Sep 2005 8:06 PM
mscertified
I've been given the task of converting all our Access 97 databases to Access
2000.
I found one app that uses a VB6 front end.
I am not a VB6 programmer but I opened the project and found the following:

Public Sub GetConnection()
    Set goConn = Nothing
    Set goConn = New ADODB.Connection
    goConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" _
        & "Data Source=" & App.Path & "\Srtsdata.mdb"
    goConn.Open   
End Sub

This is how the connection to the Access db is established. Where App.Path
comes from I have no idea; there is no reference to it in the code.
The folder where the EXE is located contains a slew of files DLL, OCX, LST,
CAB etc. etc.
Can someone throw some light on what I need to do to convert this VB6
program. Its likely the name and location of the database will change.

Thanks - David

Author
20 Sep 2005 8:31 PM
alpine
On Tue, 20 Sep 2005 13:06:17 -0700, "mscertified"
<rup***@tigerlily.com> wrote:

Show quoteHide quote
>I've been given the task of converting all our Access 97 databases to Access
>2000.
>I found one app that uses a VB6 front end.
>I am not a VB6 programmer but I opened the project and found the following:
>
>Public Sub GetConnection()
>    Set goConn = Nothing
>    Set goConn = New ADODB.Connection
>    goConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" _
>        & "Data Source=" & App.Path & "\Srtsdata.mdb"
>    goConn.Open   
>End Sub
>
>This is how the connection to the Access db is established. Where App.Path
>comes from I have no idea; there is no reference to it in the code.
>The folder where the EXE is located contains a slew of files DLL, OCX, LST,
>CAB etc. etc.
>Can someone throw some light on what I need to do to convert this VB6
>program. Its likely the name and location of the database will change.
>
>Thanks - David


The App object is a global object in VB and contains various
properties relating to the application including it's installed Path.

As for converting your connection string, you might want to have a
look at Carl Prothman's OLEDB connection string page: 

http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJet


HTH,
Bryan
____________________________________________________________
New Vision Software                   "When the going gets weird,"
Bryan Stafford                      "the weird turn pro."
alpine_don'tsendspam@mvps.org     Hunter S. Thompson - 
Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas