No of visitors who read this post: 2401
Type: Question
No votes yet

Hi,

     I am facing problem with Data1 control when i connect it with MS-Access 2003. First of all, i  set  "Connect" property to "Access", then i set “DatabaseName” property which is basically the path of ".mdb file", up to this stage it works fine but when I set “RecordSource” property it generates an error. i don’t know how to solve it.

Microsoft Visual Basic

Unrecognized database format 'E:\E\Projects\Shah Agha Stock\StockApplication.mdb'. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

# Comment Id: 30203

Direct Access Object or DAO doesn’t support Microsoft Access 2003. To solve this issue you must use the ADODC control or the Active X Data Object Data Control to manipulate Microsoft Access 2003 database. If you are not able to do this kind of connection and you skills stick to Direct Access Object, save as you’re your Database file to Microsoft Access 2000 or Microsoft Access 97 database format. This will solve your problem.

But as far as the advancement is concerned, try to learn how to use the ADODC control or the Active X Data Object Data Control. This control is more flexible and reliable compared to that of Direct Access Object or DAO.

# Comment Id: 30575

I just want to ask you, are you using this connection string  "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=false,'?
If you are using that one, of course it won't recognize your dao because it is for earlier version of access, preferably access 97. Try using this one in your connection string "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=false;".  As per explanation, OLEDB.4.0 is for access 2000 and beyond.

# Comment Id: 110298

This is because Visual Basic's Jet 3.51 engine cannot fetch Access 2000 database versions and above. The best way to solve this is to recreate the database using the Visual Basic 6's native visual data manager and save to an older version like Access 97. Another option is to convert your database to Access 97 version using the Convert Database utility of Microsoft Access.

Thank you for posting your question at Techyv!