RE: SQL Success Return Codes

2000-07-14 Thread DeVoil, Nick
> It *will* just "be there". Let's pretend I didn't say that. It'll be there in SQL Server but not in CF, just like Dave said. Nick ** Information in this email is confidential and may be privileged. It is intended for the a

RE: SQL Success Return Codes

2000-07-14 Thread DeVoil, Nick
> > > I spent a few minutes looking at SQL Server Books Online, > > > and couldn't find anything which SQL Server would automatically > > > return how many records were updated by a query. You can use the > > > RETURN keyword within a stored procedure to return a value, or > > > you could use RAI

Re: SQL Success Return Codes

2000-07-14 Thread Paul Hastings
> > what about @@ROWCOUNT? it returns the number of rows > > affected by the last sql statement. > > That's what I used in the sample trigger I included earlier in this thread, > but as far as I know, your query itself has to actually reference @@ROWCOUNT > and specifically return it; it won't

RE: SQL Success Return Codes

2000-07-14 Thread Dave Watts
> > I spent a few minutes looking at SQL Server Books Online, > > and couldn't find anything which SQL Server would automatically > > return how many records were updated by a query. You can use the > > RETURN keyword within a stored procedure to return a value, or > > you could use RAISERROR to t

Re: SQL Success Return Codes

2000-07-13 Thread Paul Hastings
> I spent a few minutes looking at SQL Server Books Online, and couldn't find > anything which SQL Server would automatically return how many records were > updated by a query. You can use the RETURN keyword within a stored procedure > to return a value, or you could use RAISERROR to throw an erro

RE: SQL Success Return Codes

2000-07-13 Thread Dave Watts
> I guess what he (and I) would like to know is that if there > is a way to know that the SQL actually updated the record, not > if it ran, I know (by passed experience) that SQL has some > returns code (100=no record found, etc) which are store in > a returned variable... in other languages after

RE: SQL Success Return Codes

2000-07-13 Thread Perez, Bismark
? Bismarck Perez -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 13, 2000 1:43 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: SQL Success Return Codes > "OurDataSource"> > UPDATE EMPLOYEES >

RE: SQL Success Return Codes

2000-07-13 Thread Dave Watts
> "OurDataSource"> > UPDATE EMPLOYEES > SET SALARY = 7 > WHERE EMP_NAME = 'MEE' > > > Assuming the EMP_NAME was 'ME' instead of 'MEE', the > update will not take place. The Database return code > woud be 'zero rows updated'. > > Is there a way to know whether the update was