We have some weird results when trying to insert numeric values into a AutoNum column. Try to insert:
insert into AutoNum (AutoNum) values (77100001);
insert into AutoNum (AutoNum) values (22200055);
insert into AutoNum (AutoNum) values (33300034);
insert into AutoNum (AutoNum) values (77400023);
insert into AutoNum (AutoNum) values (12500067);
in a Access DB consisting of table 'AutoNum' with a single column 'AutoNum' which is a Long Integer with type AutoNum (de: AutoWert).
The ODBC-JDBC driver shows the expected result:
But the HXTT JDBC driver results in:
Any idea on this?
Yeah. AutoNum column should be maintained automatically by database engine, so that you needn't to define a value in insert or update sql. You can assign a big value than all values in the existent rows, then HXTT Acces will accept it. If you use a smaller value, then HXTT Access will ignore it, and use the next autoincrement value.
If you wish to insert random value for AutoNum columns, you should change your AutoNum type into long type. We don't think that MS Access ODBC driver is doing a correct action since AutoNum type isn't updatable in MS Access.
I understand how this is done from HXTT Access, but I don't understand why?
This makes some problems for us because we get a predefined Access database and have to fill it with data. In our case it even makes more sense to omit the AutoNum facility of Access and use precalculated numbers. This worked well with the JDBC-ODBC bridge but not with HXTT Access.
Forcing HXTT Access to work like the JDBC-ODBC bridge doesn't seem to work. Right?
Any proposals for this without changing in the resulting database schema?
>In our case it even makes more sense to omit the AutoNum facility of Access
>and use precalculated numbers.
>This worked well with the JDBC-ODBC bridge but not with HXTT Access.
Now HXTT Access works like MS Access ODBC driver for AutoNum. Please download the latest package.