×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help! Visual Basic 6.0 to Access 2000

Help! Visual Basic 6.0 to Access 2000

Help! Visual Basic 6.0 to Access 2000

(OP)
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 "invalid format on 'newdb.mdb'" Can someone please help? Thanks - (janj@freewwweb.com)

RE: Help! Visual Basic 6.0 to Access 2000

Hi, this is what I use and it works just fine :

Public connLP As ADODB.Connection

Public Sub OpenConn()
Dim sDB As String
Set connLP = New ADODB.Connection
connLP.CursorLocation = adUseClient
' sDB = GetSetting(appname:="prjTM", section:="DataBase", Key:="CurrentDB", Default:="C:\DbTM.mdb")
' iHomeBrickID = GetSetting(appname:="prjTM", section:="HomeBrick", Key:="BrickID", Default:=0)
'
' If sDB = "" Then sDB = "D:\Develop\TM\DbTM.mdb"
If sDB = "" Then sDB = "D:\Develop\LusoPiyus\DB\DBLusoP1.mdb"
connLP.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sDB

End Sub

Public Sub CloseConn()
connLP.Close
Set connLP = Nothing
End Sub

' and for the recordsets ....

dim rs as new adodb.recordset
rs.Open "select * from tbProcessos where nProc = '" & sProc & "'", connLP, adOpenDynamic, adLockOptimistic


Notice the provider, thank God I've nothing to do with with ODBC drivers, when the going gets tough it crashes or hangs.




RE: Help! Visual Basic 6.0 to Access 2000

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.

RE: Help! Visual Basic 6.0 to Access 2000

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.

Karl
kb244@kb244.8m.com

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)

RE: Help! Visual Basic 6.0 to Access 2000

but then again i'll look into what rgordley said

Karl
kb244@kb244.8m.com

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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close