I have a transaction here that was working fine, but is now returning
"[Macromedia][SQLServer JDBC Driver][SQLServer]Could not find prepared
statement with handle -1. " when executed.  I have also started and started
all MX services, hoping that it might fix it, it does not.  Again, the
strange this is that this was working just fine, and is now failing on any
insert (or at least, any insert with transactions and a set nocount off/on
statement).  Using CFMX on 2kserver/IIS and MSSQL7 on another machine (2k
server).  Here is one of the offending statements, the only difference
between this and the others that fail is Contact versus Account.  Removing
the address insert from the top also does nothing.

Hopefully someone has a clue!  Thanks!

-----------------------------------

 <cftransaction action="begin">

 <cfquery name="InsertAddress" datasource="CRMdb" debug="Yes">
 set nocount on

 insert into address(street1, street2, city, state, postal, country, attn)
 values(<cfqueryparam value="#form.street1#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.street2#" cfsqltype="cf_Sql_varchar">,
  <cfqueryparam value="#form.city#" cfsqltype="cf_sql_char">,
  <cfqueryparam value="#form.state#" cfsqltype="cf_Sql_varchar">,
  <cfqueryparam value="#form.postal#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.country#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.attn#" cfsqltype="cf_Sql_varchar">)

 select @@identity as currentaddressid

 set nocount off
 </cfquery>
 <cfquery name="InsertAccount" datasource="CRMdb" debug="Yes">
 set nocount on

 insert into accounts(accounttypeid, companyname, esacctid, espurchid,
mainphone, altphone, fax,
  emailtype, webaddress, createuserid, industryid, employees,
productinterestids, addressid)
 values(<cfqueryparam value="#form.accounttypeid#"
cfsqltype="cf_Sql_integer">,
  <cfqueryparam value="#form.companyname#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.esacctid#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.espurchid#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.mainphone#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.altphone#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.fax#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.emailtype#" cfsqltype="cf_sql_char">,
  <cfqueryparam value="#form.webaddress#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#client.userid#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.industryid#" cfsqltype="cf_sql_integer">,
  <cfqueryparam value="#form.employees#" cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#form.productinterestids#"
cfsqltype="cf_sql_varchar">,
  <cfqueryparam value="#insertaddress.currentaddressid#"
cfsqltype="cf_sql_integer">)

 select @@identity as currentaccountid

 set nocount off
 </cfquery>
  <cftransaction action="commit">
  </cftransaction>


---------------------------
Other Error Info:
      Error Executing Database Query.
      [Macromedia][SQLServer JDBC Driver][SQLServer]Could not find prepared
statement with handle -1.

      The Error Occurred in
C:\Inetpub\wwwroot\production_tree\Accounts\accounts_add.cfm: line 157
      Called from C:\Inetpub\wwwroot\production_tree\Accounts\accounts.cfm:
line 45
      Called from
C:\Inetpub\wwwroot\production_tree\Accounts\accounts_add.cfm: line 157
      Called from C:\Inetpub\wwwroot\production_tree\Accounts\accounts.cfm:
line 45

155 :
156 :   set nocount off
157 :   </cfquery>
158 :   <cfquery name="InsertAccount" datasource="CRMdb" debug="Yes">
159 :   set nocount on




______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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

Reply via email to