I'm getting a crazy error on some of my action pages that use <cfqueryparam>
and SELECT @@IDENTITY after installing CFMX, could one of you super MX type
of people help me out...
this is my error:
Could not find prepared statement with handle -1.
and this is the (abridged) code:
<cfquery name="insertStaffMember"
datasource="#request.DB.DataSource#"
username="#request.DB.UserName#"
password="#request.DB.Password#">
SET NOCOUNT ON;
INSERT INTO StaffMembers(FirstName,
LastName,
EmailAddress)
VALUES(<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#Trim(attributes.FirstName)#">,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#Trim(attributes.LastName)#">,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#Trim(attributes.EmailAddress)#">);
SELECT @@Identity AS StaffMember_id;
SET NOCOUNT OFF;
</cfquery>
..then I run another query here that loops through a list office_ids that
inserts the freshly submitted StaffMember_id and ties them to
different/multiple offices. I really don't want to give up on my queryparam
tags just yet, but that's the only workaround I can find->
Tyler Silcox
email | [EMAIL PROTECTED]
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists