Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2002 to Access 97 conversion in VB6

Status
Not open for further replies.

efighettib

Structural
Jan 13, 2004
26
CL
Hello!

Certain program generates a database in Access 2002 format, but Visual Basic 6 only can recognice Access 97 format. (as I know)
Can anyone tell me if there is a code to transform the database without using sendkeys?

Thanks a lot.

 
Replies continue below

Recommended for you

Hi,

VB6 has several data access technologies. DAO is the oldest of these. DAO cannot recognize MSAccess formats beyond Access97. But there is another technology called ADO that can recognize Access2000. I'm not sure about Access2002, but possibly it can handle that also. If you make an ODBC data source out of your Access file, than you can work with any version of Access from VB6.

Best regards.

Yeasir Rahul
Principal,
VoltSmith Technologies
Industrial Control and Automation

Email: rahul@voltsmith.com
Web :
 
You should not be having any problems using the ADO objects to read and write to an A2K database.

Can you post the code that you're using? And please indicate which ADO references you've included in the VB project.
 
In my form, I have a Data control called "Data1" with this properties:
Connect: Access
Default type: 2 Use jet

----------------------------
' An extract of the code is
Data1.DatabaseName = "Here is the name"
Data1.RecordsetType = 0
Data1.RecordSource = "Coordinate Systems"
' here are some other lines
' and then the code follows
data1.refresh
' and rise the next error

ERROR 3343. The format of the database is not recognized.
 
You are using DAO based data control. Use ADO based control ADODC instead. That will recognize Access2000 and derivatives alright.

From Project->Components menu select "Microsoft ADO Data Control 6.0" and the ADODC control will be added in your toolbox window.

Regards



Yeasir Rahul

Principal, VoltSmith Technologies
 
The use of Ado sounds good, but the name of the database change on each execution of the program, because its name is the date and the time when the programs starts.
So, the use of ADO its a little bit difficult in thids case.

Help?
 
You can set the connection string property of the ADODC control programmatically

Good Luck
johnwm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top