>It's worked fine for me with ODBC and JDBC. The INSERT doesn't return a
>recordset, the SELECT does. I may well have just been extremely lucky, I
>guess, but I wouldn't think this is required. You are aliasing the
>@@IDENTITY value, right?

Yes, I was using an alias.  I think what I'm remembering has to do with plain 
jdbc and how it handles this statement:

INSERT INTO TheTable (Column) VALUES ('test'); SELECT @@IDENTITY AS 
TheIdentityValue;

A statement.execute() would return two results (loosely speaking). The first 
being a count of rows affected by the INSERT and the second the resultset 
returned by the SELECT. If you were to assume the resultset was in the first 
position, and simply called statement.getResultSet(), you wouldn't find the 
column TheIdentityValue. For that you have to cycle through the results using 
statement.getMoreResults().

I could be totally wrong here, but I think that might have been the cause of 
the problem I'm remembering. ie cfquery was only expecting a single set of 
results and ignored anything after the first one. That would explain why 
#queryName.columnName# was reported undefined.

Janet





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292151
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to