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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unrecognized database format. 2

Status
Not open for further replies.

1way2findout

Technical User
Oct 14, 2004
22
US
I know this question has most likely been asked before, but I need help on correcting this issue with visual basic 6. I have data control which has a data source created in access 2003. When I execute the project I get an unrecognized database format error, what steps do I take correct this problem? It works fine with access 97 but I would like to upgrade.
 
Install the latest vb service pack (6) and the latest version of MDAC (2.8) - both of which are available from microsoft.
 
bjd4jc , I have the same error. I have SP6, and installed 2.8, but still no go. I can use BIBLIO.MDB if I don't update it to Access2000. This my first attempt at ADO, still stumbling.
References include
MADO 2.8 Library
MADO Recordset 2.8 Library.
Code:
Dim dbInvt As ADODB.Connection
Dim rsInventory_Code As ADODB.Recordset
Set dbInvt = New ADODB.Connection
dbInvt.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\Program Files\Microsoft Visual Studio\VB98\BIBLIO1.MDB"
dbInvt.Open  'error here  - BIBLIO1.MDB has been converted to Access2000
Thanks,
lrott


 
Change
Provider=Microsoft.Jet.OLEDB.3.51

to

Code:
Provider=Microsoft.Jet.OLEDB.4.0
 
I have tried both of these responses with no luck when I use Set dbInvt = New ADODB.Connection or whatever Set gets flagged as an invalid outside procedure.

I have also downloaded SP6 and MADO 2.8 Library with no results.
 
1way2findout

The message "... invalid outside procedure ..." means that you are attempting to issue an executable command (SET in this case) in the General Declarations section of a module, form or class. Any and all such executable commands must occur within a Sub, Function, Let or Get procedure.

You can however

Dim dbInvt As New ADODB.Connection

in the General Declarations section.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top