SimonTheSponge
Programmer
I have a couple of questions, firstly what is the concensus
on inserting records into a table, do people pass an string containing an insert command with a connection.execute method
or
use the rs.addnew, assign the fields rs!fld1 = "blah" etc and then do a rs.update
Secondly if I have an autoincrementfield how do I get the value back after adding. I found a thread that indicated that Jet 4.0 supports @@identity, but using a seperate "select @@idendity from table" seems a little inadequate.
After doing a rs.addnew and then and rs.update , I was expecting the the local rs!autoincrfield to contain the new value, but it contains 0. Of course on the database it has successfully added an incremented value
How do people generally cope with Autoincrfields or do they not use them ?
on inserting records into a table, do people pass an string containing an insert command with a connection.execute method
or
use the rs.addnew, assign the fields rs!fld1 = "blah" etc and then do a rs.update
Secondly if I have an autoincrementfield how do I get the value back after adding. I found a thread that indicated that Jet 4.0 supports @@identity, but using a seperate "select @@idendity from table" seems a little inadequate.
After doing a rs.addnew and then and rs.update , I was expecting the the local rs!autoincrfield to contain the new value, but it contains 0. Of course on the database it has successfully added an incremented value
How do people generally cope with Autoincrfields or do they not use them ?