thankyou Spike and Taco

 

I’m researching into what the ESQL (Informix’s version of T-SQL) can actually do with output parameters in returning something like SQL’s @@rowcount

 

>> statement will return the number of rows affected. This gets supressed as an informational message (I don't remember whether that's at the ODBC/JDBC level, or by ColdFusion)

 

if this “dumping the junk” is done at the driver level (ODBC socket and datadirect JDBC) then we’ve probably got no hope.

 

but if it was CF that blocked the return status codes/values/etc, any idea where to start looking within the java classes, looking for a property where it might be (Oh, wouldn’t it be cute to be something like myQuery.rowcount(), eh?)

 

thanx again for your help

barry.b

 

 

 

From: Stephen Milligan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 16 June 2004 10:40 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: returning number of rows affected (updates, deletes)

 

In SQL Server you would normally do this by supressing informational messages using NOCOUNT

 

e.g.

 

<cfquery datasource="#somedsn#' name="qInsertUser">

 

SET NOCOUNT ON

 

INSERT INTO users

(firstname,surname)

VALUES

('bob','cratchitt')

 

SET NOCOUNT OFF

 

SELECT @@IDENTITY AS newID

</cfquery>

 

The problem being that by default the insert statement will return the number of rows affected. This gets supressed as an informational message (I don't remember whether that's at the ODBC/JDBC level, or by ColdFusion) and the rest of the information coming back is assumed to be junk even if it may contain a recordset.

 

If Informix has an equivalent of NOCOUNT then you should be able to do something similar.

 

Spike

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org

 

 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to