Hi there I've got the following problem scenario. After inserting a new record into a table with a auto_inc id, I need to get the new id back to insert into another table.
I use the following code to do this: dim rs as recordset dim newid as long 'this works set rs = dataenvironment.connection.execute( " SELECT LAST_INSERT_ID() AS newid " ) 'this fails with message: "[Microsoft][ODBC Driver Manager]Driver does not support this parameter" newid = rs.fields("newid").value When I insert into the other table with the following it works, but I need to set it to another variable as the above example shows. dataenvironment.connection.execute( " INSERT INTO othertable ( newid ) VALUES ( LAST_INSERT_ID() ) " ) If you have any ideas what it might be it would help. OS = Win2K + SP2 VB = 6 MySQL = 3.23.49 MyODBC = 2.50.39 Thanx Riaan Stander --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php