General discussion

Locked

unrecognized database format

By im_a_beginner ·
hi to all... i have a problem using access in vb.. i create a table in access and i save it.. and when i use vb and connect the database there is an error saying "Unrecognized database format".. how should i correct this.. i am using vb6 and office 2000 in windows 2000... pls help.. tnx

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Miss Kitty In reply to unrecognized database for ...

The problem is probably how you're trying to access the database. Below is a sample code of how to connect to a table within an Access database and run an Access query.

Dim objConn As New ADODB.Connection
Dim objCmd As New ADODB.Command
Dim objRS As New ADODB.Recordset
Dim objParam As ADODB.Parameter
Dim count As Integer

'set up the database pointer
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=E:\ACCESS\CONTRACT HAULERS\HAULER.mdb;User ID=ADMIN"
objRS.CursorType = adOpenDynamic
objRS.LockType = adLockOptimistic

'setting the Active Connection for the command object
objCmd.ActiveConnection = objConn

'Providing the query name as commandtext
objCmd.CommandText = "[DELETE TTICKET QUERY]"
objCmd.CommandType = adCmdStoredProc

'Set the recordset to the command object result
Set objRS = objCmd.Execute

Good Luck
Cathy

Collapse -

by cyberbob In reply to unrecognized database for ...

Go to your start menu, then open Control Panel. Look at your data sources by going to control panel, then to administrative tools, open data sources. Examine User dsn, system dsn, and file dsn. Create a connection in User and system by clicking add, and follow to whatever database driver you are using nad select the database file that you created in Access. If you have Visual Basic configured properly it should be able to access the database from the obbc connections.

Collapse -

by bordsoft In reply to unrecognized database for ...

Try downloading & applying Visual Studio 6.0 Service Pack 6. (http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp6/default.aspx). The problem is to do with version of Jet engine shipped with Win2000 and VB6. Good luck

Collapse -

by Juergen Hartl In reply to unrecognized database for ...

You could save the ACCESS database in access97 format

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums