locked
Accessing a Access 2.0 database (1994) from VS2008 RRS feed

  • Question

  • Hi,

    I have to change some data in a Access 2.0 database. I can open the database using VS2008, OLEDB, no problem and I can read data. But as soon as I try to execote a DELETE FROM .... statement, I get an error, talking about a unknown database format????

     

    Is anybody out there who knows a lot about backward compatibility?

     

    THANKS

     

    Gerhard

     

    Friday, May 30, 2008 8:30 AM

Answers

  • You can also use the 16-bit version of Visual Basic 4.0 if you have a copy.

    I know there are some differences between the 16-bit version of Access and the 32-bit version so you may not be able to write to this version from Jet OLEDB. Also, If you were using DAO I remember that there was a compatibility layer required for Visual Basic 3.0:

    FILE: Fact Sheet on Jet 2.0/VB 3.0 Compatibility Layer

    One other thing you may want to try is to use DAO in .NET instead of the ADO.NET OLEDB library.

    Tuesday, June 3, 2008 12:24 PM

All replies

  • You need to specify type of the database in your connection string. You could do it using Jet OLEDB:Engine Type connection string property. I do not know exactly what would be the value for Access 2.0, but available options could be found here

     

     http://msdn.microsoft.com/en-us/library/aa140022.aspx#adoproperties_extendedsettings

     

    Friday, May 30, 2008 9:49 AM
  • Hi,

    thanks for helping. I found out, that my Type=3, but the error still remais. I also try to open the database via ODBC driver and I get the same error message.

     

    I use a brand new copy of the database, so artifacts from former try outs are not present for shure.

     

    In general, is it supported to write to a Access 2.0 database?

    If I could open the database for read, what can happen, that I get this strange error at write attempts?????

     

    I get the message, that some file in the temp directory doesnt have the correct file format, or database format?

     

    Thanks for helping

     

    Gerhard

     

    Friday, May 30, 2008 1:00 PM
  • In general Access 2.0 is not supported, since it is very old. Even Jet OLEDB provider is depricated and Microsoft suggests to move from it. But since Jet OLEDB has property to specify Access 2.0 database type, I would expect it to work. The reality is that not many people would be able to help you, since it is outdated product. Do you have any specific reason to use Access 2.0? Can you migrate to some other database? You could get SQL Server Express edition for free and it is much better, and has functionality of SQL Server.

     

    Saturday, May 31, 2008 1:29 AM
  • Hi,

    I know, and migration is in progress. But last week, the system has a failure and I have to do a repair. It taks more than 4 hours. I found out, that a lot of data could be removed from the production system to an archive. So I decide to wrote a .net programm to carry out this operations, because I know, that reading of the old file is no problem. Unfortunately, writing doesnt work. The program runs on Win 3.11, so its not easy to use SQL Server and each hour of work which I put into the old stuff is wasted, because the new system (.net and SQL Server based) is coming soon.

     

    Thanks for helping, maybe you know anybody of the Access Group, who can help?

     

    Gerhard

     

    Saturday, May 31, 2008 4:35 AM
  • Can you upgrade the Access 2.0 database to a 32-bit version? I don't think you're going to have much luck updating this 16-bit version of the database from the 32-bit world. As a matter of fact you may end up corrupting the database.

    Monday, June 2, 2008 2:02 PM
  • Hi Paul,

    it doesnt actually solve my problems but I know now, that I only can write a programm in VB3 (no typo!!) and solve the problem within the old world.

    Not nice, but ......

    With best regards

    Gerhard

     

    PS: I finally found out, that the system opens a temporary file, just it does at Win3.11, but than, the system doesnt understand the content.....?? Maybe some incompatibillity. As reading data didnt need temporary files, this problem dont appear during read operations. So far my idea, whats happen here.

     

    Monday, June 2, 2008 2:14 PM
  • You can also use the 16-bit version of Visual Basic 4.0 if you have a copy.

    I know there are some differences between the 16-bit version of Access and the 32-bit version so you may not be able to write to this version from Jet OLEDB. Also, If you were using DAO I remember that there was a compatibility layer required for Visual Basic 3.0:

    FILE: Fact Sheet on Jet 2.0/VB 3.0 Compatibility Layer

    One other thing you may want to try is to use DAO in .NET instead of the ADO.NET OLEDB library.

    Tuesday, June 3, 2008 12:24 PM