Error In Connecting Access 2003 With Data1 Control In Vb6

Asked By 0 points N/A Posted on -


     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:EProjectsShah Agha StockStockApplication.mdb'. 

Best Answer by Trevor
Best Answer
Best Answer
Answered By 0 points N/A #119654

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.

Answered By 0 points N/A #119656

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.

Answered By 0 points N/A #119658

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!

Login/Register to Answer

Related Questions