[thelist] Converting VBScript from Access to SQL

Wade Armstrong wade_lists at runstrong.com
Wed Nov 20 11:49:01 CST 2002


on 11/19/02 8:25 PM, Jeremy Weiss at jweiss03 at comcast.net wrote:

> I've changed the connection string to an SQL DNS one and now it's adding the
> an id, but it's the wrong id.
As Eric suggested, make sure that you tables are set up as you expect,
particularly that your id is, in fact, of a numeric datatype (I've seen
upsizing change numeric fields into varchars), set to be IDENTITY(1,1) (or
whatever you want your starting number and steps to be), and set as a
primary key. IF all those things are true, THEN you should ALWAYS get the
right result by SELECTing @@IDENTITY.

Did you get the expected result using the recordset method you'd earlier
used with Access? If not, try.

Wade




More information about the thelist mailing list