I tried looking through old threads and couldn't come up with any information that was helpful..
Scenario - Converting our Access97 database to use linked tables to a SQL Server.
Problem - We have a table "blah" with autonumber field "num". The existing code is;
set rs = db.openrecordset("blah"
rs.addnew
recordid = rs!num
This works fine with the native access tables, but when using linked tables to the SQL Server we get a few errors - most of which i had expected. So the code changes to...
set rs = db.openrecordset("blah",dbopendynaset,dbseechanges)
^^^^^^^^^^^^^^^^^^^^^^^^^
rs.addnew
recordid = rs!num
the problem is that when using the native table, the autonumber field "num" is populated with the new id. When using the sql server linked tables, the field is not populated with the new autonumber.
I suspect that this has to do with native tables the jet engine assigns the autonumer wheras the sql engine takes over the job of doing this when using the linked tables.
Does anybody know of a workaround / have knowledge with this kind of stuff?
Thanks,
Lachlan.
Scenario - Converting our Access97 database to use linked tables to a SQL Server.
Problem - We have a table "blah" with autonumber field "num". The existing code is;
set rs = db.openrecordset("blah"
rs.addnew
recordid = rs!num
This works fine with the native access tables, but when using linked tables to the SQL Server we get a few errors - most of which i had expected. So the code changes to...
set rs = db.openrecordset("blah",dbopendynaset,dbseechanges)
^^^^^^^^^^^^^^^^^^^^^^^^^
rs.addnew
recordid = rs!num
the problem is that when using the native table, the autonumber field "num" is populated with the new id. When using the sql server linked tables, the field is not populated with the new autonumber.
I suspect that this has to do with native tables the jet engine assigns the autonumer wheras the sql engine takes over the job of doing this when using the linked tables.
Does anybody know of a workaround / have knowledge with this kind of stuff?
Thanks,
Lachlan.