Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 25 Oct 2010 @ 22:17:39 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Retrieving Identity from Last Insert
 
From:   Michael Kappel

I set the ODBC Return Generated Keys to Identity Column . My code calls SQLBindParamter and SQLExecute to do the insert, and then SQLMoreResults and SQLFetch to retrieve the identity value. All is good except when I want to reuse the statement. I figured out that I need to call SQLMoreResults after the fetch to drain out the results or it fails on the next SQLBindParamter with Function Sequence Error . However, getting past that, after I call SQLBindParamter and SQLExecute on the second insert, SQLMoreResults returns a NO_DATA result. How can I get around not having to SQLPrepare the statement again?


Dr. Michael R. Kappel



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023