Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Visual Basic 6.0 to Access 2000

Status
Not open for further replies.

sambeau

Programmer
Mar 25, 2000
1
0
0
US
Visit site
I am brand new VB programmer. I had written some projects for school using VB 6.0 to Access (Office 97). The activex data objects work fine. I just installed Office 2000. I created a new database for a new project I am working on and now when I use the activex data object control, I get an error linking to the Access 200 database. It says &quot;invalid format on 'newdb.mdb'&quot; Can someone please help? Thanks - (<A HREF="mailto:janj@free
 
Hi, this is what I use and it works just fine :<br>
<br>
Public connLP As ADODB.Connection<br>
<br>
Public Sub OpenConn()<br>
Dim sDB As String<br>
Set connLP = New ADODB.Connection<br>
connLP.CursorLocation = adUseClient<br>
' sDB = GetSetting(appname:=&quot;prjTM&quot;, section:=&quot;DataBase&quot;, Key:=&quot;CurrentDB&quot;, Default:=&quot;C:\DbTM.mdb&quot;)<br>
' iHomeBrickID = GetSetting(appname:=&quot;prjTM&quot;, section:=&quot;HomeBrick&quot;, Key:=&quot;BrickID&quot;, Default:=0)<br>
'<br>
' If sDB = &quot;&quot; Then sDB = &quot;D:\Develop\TM\DbTM.mdb&quot;<br>
If sDB = &quot;&quot; Then sDB = &quot;D:\Develop\LusoPiyus\DB\DBLusoP1.mdb&quot;<br>
connLP.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=&quot; & sDB<br>
<br>
End Sub<br>
<br>
Public Sub CloseConn()<br>
connLP.Close<br>
Set connLP = Nothing<br>
End Sub<br>
<br>
' and for the recordsets .... <br>
<br>
dim rs as new adodb.recordset <br>
rs.Open &quot;select * from tbProcessos where nProc = '&quot; & sProc & &quot;'&quot;, connLP, adOpenDynamic, adLockOptimistic<br>
<br>
<br>
Notice the provider, thank God I've nothing to do with with ODBC drivers, when the going gets tough it crashes or hangs. <p> <br><a href=mailto: > </a><br><a href= > </a><br>
 
The M$ company line on this is that if you have Active data objects Library 2.1 included in your project, you should be able to deal with access 2000 databases.
 
Now I've had lots of people ask me the same Question, Sometimes it works, sometimes it doesnt, but If you can, or wouldnt mind, the best solution is to revert back to Access 97, Which is what my Office did, and many other copanies due to too many problems with the development. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML, ASP(somewhat), QBasic(least i didnt start with COBOL)
 
but then again i'll look into what rgordley said <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML, ASP(somewhat), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top