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!

Why Unrecognized Database Format??? or Oject 1

Status
Not open for further replies.

Gert

Programmer
Apr 9, 2000
240
0
0
DO
Hi all:

I got some problem trying to use an access 2000 database using code.

When I try it to use it like this, I got an error
"Unrecognized Database Format"

Set db = OpenDatabase("C:\Store\shopp.MDB")

and when I try in this way (the way I wish) I got
" Oject Required ", what should I do, any help please will be apreciate"

Data1.DatabaseName = "C:\Store\shopp.MDB"
 
>>Unrecognized Database Format
You should using Jet OLEDB 4.0
 
you are using DAO . So you should choice Microsoft DAO 3.51 from References of project menu. If use ADO then you should use oledb4.0
 
I am trying to connect to Access 2000 database from VB6 application.

I keep getting "Unrecognized database format hello.mdb"
Public dbsConnection As Database
Set dbsConnection = OpenDatabase("c:\hello.mdb")

thanks
nath
 
Also I am trying to connect to Access 2000 database from Visual Basic 6, I am using DAO and I have choose in the reference options Microsoft DAO 3.51 and I still with the problem of Unrecognized Database Format, so I changed to
Microsoft DAO 3.6 and I could open the database but some properties like " refresh " can't run it, I don't know why ?

If someone can help me I will be apreciate, please!!!
 
If you're sure your code should work, or if it worked at some point and stopped, you may need to run Repair then Compact database using Access. If one of your users left the database in a "Suspect" state (connection not closed properly due to crash or something), there's a chance that corrupted the database.

Just something else to try if nothing else makes sense...

-Mike Difference between a madman and a genius:
A madman uses his genius destructively,
A genius uses his madness constructively.
 
Can you open the database in access? If not, try repairing the Access database. The solution could be just that simple.


reidfl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top