Re: sql param error

2008-11-22 Thread Seb Duggan
One thing to bear in mind with errors thrown in the middle of a query  
is that the specified line number is not necessarily the problem one -  
it just means there's an error somewhere in the query.

In this case, somewhere in the query there's an integer parameter that  
you're trying to insert into an ntext column.

My guess is that it's this one:

JeopardyExplain = cfqueryparam value=#Arguments.pJeopardyExplain#  
cfsqltype=cf_sql_integernull=#nJeopardyExplain#

as all the other Explain columns are using  
cfsqltype=cf_sql_longvarchar.


Hope this fixes it.

--
Seb Duggan
Web  ColdFusion Developer

e:  [EMAIL PROTECTED]
t:  07786 333184
w:  http://sebduggan.com



  Error Executing Database Query.

 [Macromedia][SQLServer JDBC Driver][SQLServer]Operand type clash:  
 int is
 incompatible with ntext

 The error occurred in
 *C:\htdocs\irb\functions\_functions_protocol_events.cfc: line 491*
 *Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line  
 258
 *Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line 1
 *Called from* C:\htdocs\irb\functions\_functions_protocol_events.cfc:
 line 491
 *Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line  
 258
 *Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line 1

 489 : Corrective_Explain = cfqueryparam  
 value=#Arguments.pCorrectiveExplain#  
 cfsqltype=cf_sql_longvarchar null=#nCorrectiveExplain#
 490 :
 *491 : where Info_Id = cfqueryparam  
 value=#Arguments.pInfoId# cfsqltype=cf_sql_integer*
 492 : /cfquery
 493 :



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315804
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


sql param error

2008-11-21 Thread Scott Stewart
  Error Executing Database Query.

[Macromedia][SQLServer JDBC Driver][SQLServer]Operand type clash: int is 
incompatible with ntext
 
The error occurred in 
*C:\htdocs\irb\functions\_functions_protocol_events.cfc: line 491*
*Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line 258
*Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line 1
*Called from* C:\htdocs\irb\functions\_functions_protocol_events.cfc: 
line 491
*Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line 258
*Called from* C:\htdocs\irb\proc\validate_irb_event_form3.cfm: line 1

489 : Corrective_Explain = cfqueryparam 
value=#Arguments.pCorrectiveExplain# cfsqltype=cf_sql_longvarchar 
null=#nCorrectiveExplain#
490 : 
*491 : where Info_Id = cfqueryparam value=#Arguments.pInfoId# 
cfsqltype=cf_sql_integer*
492 : /cfquery
493 :
  

This is happening in a query contained in a function. 

The function is here: http://cfm.pastebin.com/m2c76bb90
(note: I'm debugging somone else's code)

I've dumped the arguments and form scope and it's what I expect for Info_id...

I'm at a loss..

-- 
Scott Stewart
ColdFusion Developer

Office of Research Information Systems
Research amp; Economic Development
University of North Carolina at Chapel Hill

Phone:(919)843-2408
Fax: (919)962-3600
Email: [EMAIL PROTECTED]


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315781
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: sql param error

2008-11-21 Thread Dominic Watson
My best guess would be that the db column is an nText, either by
mistake or perverse design...

Dominic

2008/11/21 Dawson, Michael [EMAIL PROTECTED]:
 Wrap the value in val().

 Mike

 -Original Message-
 From: Scott Stewart [mailto:[EMAIL PROTECTED]
 Sent: Friday, November 21, 2008 11:11 AM
 To: cf-talk
 Subject: sql param error


 489 : Corrective_Explain = cfqueryparam
 value=#Arguments.pCorrectiveExplain# cfsqltype=cf_sql_longvarchar
 null=#nCorrectiveExplain#
 490 :
 *491 : where Info_Id = cfqueryparam
 value=#Arguments.pInfoId# cfsqltype=cf_sql_integer*
 492 : /cfquery
 493 :


 This is happening in a query contained in a function.

 The function is here: http://cfm.pastebin.com/m2c76bb90
 (note: I'm debugging somone else's code)

 I've dumped the arguments and form scope and it's what I expect for
 Info_id...

 I'm at a loss..

 --
 Scott Stewart

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315785
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4