in reply to Re: Win32::ODBC and MoreResults()
in thread Win32::ODBC and MoreResults()
Yep stored procedure was going to be plan B, didn't really want to go down that route though to be honest, is just something extra to manage insetad of having it all in one script and I reckon this should work without it anyway.
I can't really do them as seperate $db->SQL's as what I'm actually trying to do is run an INSERT then retrieve the @@IDENTITY value of the last insert, needs to be done in one transaction really. Thus...
INSERT INTO T_Test (C_Data) VALUES ('data'); SELECT @@IDENTITY AS C_ID
The multiple SELECTS in one statement does and should work, two statements in one transaction basically produces two result sets and it's the MoreResults() method that tells ODBC to move on to the next result set. I don't think it works like a UNION as there isn't a requirement for the two SELECT's to have the same number of columns as a UNION statement would.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Win32::ODBC and MoreResults()
by davidrw (Prior) on Aug 11, 2005 at 12:36 UTC | |
by Lyndley (Novice) on Aug 11, 2005 at 13:03 UTC |