Link to home
Start Free TrialLog in
Avatar of Malensek
Malensek

asked on

Hot to access MSAccess 2000 database

I am using BDE 5 to access MSAccess 97 wiht no problems. Now that I upgraded database to MSAccess 2000 I get the "Unrecognized database format" error. What is wrong?
Avatar of inthe
inthe

hi,
you cant use bde to access the table unless you use the conversion tool in msaccess to convert the database to access97.

see here:
http://www.borland.com/devsupport/bde/faq/FAQ4701B.html

some more info:
5.10 only uses DAO3.0 and DAO3.5.  A2K cannot be accessed with either version. There is also a bug in A2K's ODBC drivers.  Here are two excerpts from Delphi tech alerts that deals with A2K.
 
We have heard cases of people having trouble
using Access 2000 with the BDE. It should be
noted that the BDE's native Access driver (and
Access 97) use DAO while Access 2000 uses ADO.
Attempting to open an Access 2000 table with the
BDE's native driver will give an error.  ODBC
seems to work fine with Access 2000 so this is
the recommended way to go if you're upgrading to
Access 2000.
 
Installing the newest version of the MS Access
ODBC driver, version 4.00.3711.08, can cause these
errors. This new version comes with Windows 98
release 2, Access 2000, the Microsoft Data Access
Components (MDAC) and perhaps other sources.
The error is happening because Microsoft has made a
change in the driver regarding the length of fields,
and now the BDE is expecting the field length to be
twice as long as it actually is.  For example, a
field length may be 30 in the Access database, but
the BDE reports it to be 60.
 
Microsoft documentation specifies that the length,
in bytes, of data transferred (the buffer size) on
an SQLGetData, SQLFetch, or SQLFetchScroll operation
shall be the same as the COLUMN_SIZE for binary
and character data. This is not in fact the case
with the new driver; the buffer is actually larger
than COLUMN_SIZE.
 
The BDE does not look at COLUMN_SIZE because for
numerical data it may not be the same as the
buffer size. Instead the BDE looks at the buffer
size which now has the erroneous value.
 
Workarounds:
1. Use the Delphi native driver instead of ODBC.
2. Use an older version of the Access ODBC driver.
3. In Delphi 5: Use ADO components to access the
  MS JET database engine or to access ODBC drivers.
  Accessing the ODBC driver this way is not
  optimal, but does bypass the BDE which will
  avoid the problem.
4. convert database to access97.

Regards Barry
Avatar of kretzschmar
hi malensek,

one other work arround

get this comercial bde-replacement
(works also with dao 3.6 -> access 2000)
trial is also available there

http://www.islamov.com/diamond/index.html

meikl
hi meikl,
i have the diamond access components from there but they dont work for me .
i was going to buy them last week if they worked for access2000 but
i get same error as Malensek.
"Unrecognized database format" ,if i convert the database to access97 they work great.
do you knwo how to make them work with access2000 .mdb ? theres points from me if you do :-)
Regards Barry
hi barry,

well, i'm at home until 10.jan and have not the equipment here,
but as far as i know are there two versions from diamond access
one for dao 3.5 -> access 97 and lower
one for da0 3.6 -> access 2000

i've tested at work with the trial version,
where both versions are been included

it was terrible easy to connect to access 2000
with the version for dao 3.6

about to make a access2000 mdb,
i will take a look, when i'm back at work (10.Jan)

so long

meikl ;-)
LoL

nevermind found it :-
there is property in object inspector
DaoDatabase1.DaoVersion just set it too Dao36 for access2000 or dao35 for 97. ;-)
 
Avatar of Malensek

ASKER

Inthe,
I cant use your 4th suggestion, but I would go for the first three. The problem is I dont think the first 2 are working. So I am wondering how to use ADO components in Delphi?
Just to get clear when I try to use a Delphi native MSACCESS driver I ge an BDE 13059 error : General SQL error.
Just to get clear when I try to use a Delphi native MSACCESS driver I ge an BDE 13059 error : General SQL error.
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanx to U and meikl