Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Update SQL 1

Status
Not open for further replies.

jags22

Programmer
Oct 17, 2001
44
US
I am working with a DB2 database and ASP for a little web app. The problem is on an update, is there anyway to know if an update worked. I have to go and select on the new criteria to check right now but there has to be another way. DB2 will have a return code of 1 if it updated and 0 if it didn't but How do you capture it? Or is there another way? Thanks...
 
Actually, the return code will be 0 if updated and a -100 if it did not update and some other sql code if the sql is not valid.
 
is the return code perhaps in a format such that it can be a row in an ADO recordset or an output parameter for an ADO command object??
 
This link is for a thread in the VB6 forum. If you are using ADO to connect to DB2, this method may work for you. It returns the number of records affected by a sql statement.

thread222-1222967



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Sheco, the return code is the output returned from the sql. Errors can be narrowed down by the return code.

Thanks George, I will give it a shot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top