|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB6 front end to Access 97 database2000. 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 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 The App object is a global object in VB and contains various>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 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
Database and report question
Newbie: How to extract year from a Date object VB6 : Attach Event Handlers to Dynamically Generated Controls Newbie: FOR loop on dates List all jpg files from folder (loop problem) Random first random number delete Missing File Export Template in VB.NET Question on printing with Snapshot from VB 6 VB6 IDE VBE Object reference |
|||||||||||||||||||||||