>>I need to know what the record number of a query

I suppose you mean what is the last id set to an automatic counter 
field, since physical record numbers are not accessible in SQL.

Use a query to get the maximum value of your id field, and don't forget 
to lock the area which contains the insert query, ie:

<CFLOCK...
<CFQUERY...
    INSERT ...
</CFQUERY>
<CFQUERY NAME="getMax"...
    SELECT max (idCounter) AS id
    FROM ...
</CFQUERY>
<CFSET lastId = getMax.id>
</CFLOCK>

where "idCounter" is the name of your counter column.

-- 
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283651
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