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

DSN-Less connection works with Access2000, but not Access97

Status
Not open for further replies.

Rexolio

Technical User
Aug 29, 2001
230
I am using a dsn-less connection to connect to an Access database. I created this for a friend. When I upload an Access 2000 file and test the script it works, but when he uploads an Access 97 file (same format/layout obviously) it doesn't work and says the file may be corrupt. If I take his 97 file and convert it to 2000, it works!!! I used 97 files a couple of years ago without problems. Is there something I'm missing? Here's the dsn-less connection I'm using:

PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=d:\inetpub\
 
That's because Access97 and 2000 have different DSN-less strings. They use a different provider each. Keep in mind that you should test all your queries out in 97 first. If you have simple insert, update, delete or select queries, you should be fine... but if you are aliasing your tables, use transitive tables or multiple joins or anything else more complex, you might want to give it a runthrough in the query analyzer.

2000:
PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=d:\inetpub\
97:
PROVIDER=MICROSOFT.JET.OLEDB.3.51;DATA SOURCE=d:\inetpub\
hth
leo
 
Thanks so much. However, I tried 3.51 and still the same error. Don't suppose you have any other suggestions? :)
 
instead of using the OLEDB layer, have you tried going through ODBC?

Driver={Microsoft Access Driver(*.mdb)};DBQ=d:\inetpub\
You might want to double check that...

anyways - if you can't connect through ODBC, then there might be something wrong with the 97 DB...

hth
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top