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

Problem opening my Database

Status
Not open for further replies.

Atajames

Technical User
Jul 17, 2002
11
US
Hi Guys,
I'm having problems opening my database.
Please tell me what's wrong with this codes.


Dim db as database
dim rs as recordset

set db = opendatabase("C:\Documents and _ Settings\craig\customer info,mdb")

When I run the program, I have this error message: Unrecognize database format. Run-time error '3343'

Please help!

Thanks!
 
set db = opendatabase("C:\Documents and _ Settings\craig\[customer info].mdb ----------------
Joe
 
Notive you have a comma in the file name and some spaces in the path:

customer info,mdb

"C:\Documents and _ Settings\craig\customer info,mdb"
 
sorry rushed answer, didn't notice the spaces in Documents and _ Settings, try putting this in brackets as well. ----------------
Joe
 
Oops, too fast with the click...besides, I see it got answered anyways

"C:\[Documents and _ Settings]\craig\[customer info.mdb]"
 
I entered
set db = opendatabase("C:\[Documents and Settings]\craig\[customer info].mdb")
but I now have this error: run-time error '3044'
invalid path.

 
try this:
set db = opendatabase("C:\[Documents and Settings]\craig\[customer info.mdb]")

instead of:
set db = opendatabase("C:\[Documents and Settings]\craig\[customer info].mdb")
----------------
Joe
 
I changed the directory and the name of the database. So these are the new codes:

set db=opendatabase("c:\inforamtion.mdb")

and I now have this run-time error: 3343
UNRECOGNIZED DATABASE FORMAT.
Please help

James!
 
I entered
set db = opendatabase("C:\[Documents and Settings]\craig\[customer info].mdb")
but I now have this error: run-time error '3044'
invalid path.

 
If you are getting 'unrecognized database format' check that you are using the latest version of MDAC Let me know if this helps

If you are worried about posting, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Hi,

Try putting this in as well, it worked for me :)

Set dbConn = New ADODB.Connection
dbConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & "c:\information.mdb;")

did you make the db in Access 2k or 97? If it's 97 then change the 4.0 to 3.51. Hope it helps!

-Madan
 


try this:
global db as database -->declaration

Set db = OpenDatabase(App.Path + "\information.mdb")


 
Hello

I will try to answer to question.
In fact You try to use the DAO technology to create your recordset. In order to do that, you have to chose an option in the menu bar

Project / references (I try to translate it because I have a french version of this software)

A windows will appear where you will have to choose the option "microsoft DAO 3.6 library object"

I got those problems too. You will have to do it everytime you open visual basic anew.
I hope to have been clear enough

best regards

Pitou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top