--=====================_1833866==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

Try putting the MAXLENGTH attribute on the CFPROCPARAM's that are of type 
CF_SQL_VARCHAR.

Hope this helps

Nick



At 13:56 26/06/00 +0100, you wrote:
>This message is in MIME format. Since your mail reader does not understand
>this format, some or all of this message may not be legible.
>
>------_=_NextPart_001_01BFDF6D.767FEBEC
>Content-Type: text/plain;
>         charset="iso-8859-1"
>
>I'm looking for a way of updating a SQL Server 7.0 table using a stored proc
>and the CFSTOREDPROC tag in cold fusion.
>
>Heres the procedure (just a simple update):
>
>CREATE PROCEDURE sp_UpdateCDROM ( @CDROMID int, @Title varchar(64),
>  @FullTitle varchar(128) = null,
>  @Supplier varchar(64) = null,
>  @DiskNo smallint = null,
>  @CDKey varchar(64) = null,
>  @Category smallint = null,
>  @Keywords varchar(256) = null,
>  @LoanedTo varchar(64) = null) AS
>
>  UPDATE CDCatalog
>  SET Title = @Title,
>     FullTitle = @FullTitle,
>     Keywords = @Keywords,
>     Supplier = @Supplier,
>     Category = @Category,
>     CDKey = @CDKey,
>     DiskNo = @DiskNo,
>     LoanedTo = @LoanedTo
>  WHERE CDROMID = @CDROMID
>
>And I have verified that this works as intended by testing in the Query
>Analyzer. However, when I come to use the CFSTOREDPROC tag, like this:
>
><cfstoredproc procedure="sp_UpdateCDROM" datasource="HRDB">
><cfprocparam type="in" dbvarname="@CDROMID" value="#FORM.CDROMID#"
>cfsqltype="CF_SQL_INTEGER">
><cfprocparam type="in" dbvarname="@Title" value="#FORM.Title#"
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@FullTitle" value="#FORM.FullTitle#"
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@Supplier" value="#FORM.Supplier#"
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@DiskNo" value="#FORM.DiskNo#"
>cfsqltype="CF_SQL_SMALLINT">
><cfprocparam type="in" dbvarname="@CDKey" value="#FORM.CDKey#"
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@Category" value="#FORM.Category#"
>cfsqltype="CF_SQL_SMALLINT">
><cfprocparam type="in" dbvarname="@Keywords" value="#FORM.Keywords#"
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@LoanedTo" value="#FORM.LoanedTo#"
>cfsqltype="CF_SQL_VARCHAR">
></cfstoredproc>
>
>I always get the following error message:
>
>ODBC Error Code = 22005 (Error in assignment)
>
>
>
>[Microsoft][ODBC SQL Server Driver]Invalid character value for cast
>specification
>
>
>
>SQL = "sp_UpdateCDROM"
>
>
>Data Source = "HRDB"
>
>
>
>Is one of cfsqltypes wrong in the cfprocparam tag? Do I need to feed in the
>sizes of the parameters also? It's odd because other stored procedures that
>I've written work fine when they are called from Cold Fusion.
>
>
>
>James
>
>
>
>    |   james page   |    database developer       |
>    |   UPC TV interactive   |
>    |   w. +44 (2)0 7533 6573
>    |   [EMAIL PROTECTED]
>
>
>
>------_=_NextPart_001_01BFDF6D.767FEBEC
>Content-Type: text/html;
>         charset="iso-8859-1"
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>I'm looking for a way of updating a SQL Server 7.0 table using a stored 
>proc and the CFSTOREDPROC tag in cold fusion.
>
>Heres the procedure (just a simple update):
>
>CREATE PROCEDURE sp_UpdateCDROM ( @CDROMID int, @Title varchar(64),
>  @FullTitle varchar(128) = null,
>  @Supplier varchar(64) = null,
>  @DiskNo smallint = null,
>  @CDKey varchar(64) = null,
>  @Category smallint = null,
>  @Keywords varchar(256) = null,
>  @LoanedTo varchar(64) = null) AS
>
>  UPDATE CDCatalog
>  SET Title = @Title,
>     FullTitle = @FullTitle,
>     Keywords = @Keywords,
>     Supplier = @Supplier,
>     Category = @Category,
>     CDKey = @CDKey,
>     DiskNo = @DiskNo,
>     LoanedTo = @LoanedTo
>  WHERE CDROMID = @CDROMID
>
>And I have verified that this works as intended by testing in the Query 
>Analyzer. However, when I come to use the CFSTOREDPROC tag, like this:
>
><cfstoredproc procedure="sp_UpdateCDROM" datasource="HRDB">
><cfprocparam type="in" dbvarname="@CDROMID" value="#FORM.CDROMID#" 
>cfsqltype="CF_SQL_INTEGER">
><cfprocparam type="in" dbvarname="@Title" value="#FORM.Title#" 
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@FullTitle" value="#FORM.FullTitle#" 
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@Supplier" value="#FORM.Supplier#" 
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@DiskNo" value="#FORM.DiskNo#" 
>cfsqltype="CF_SQL_SMALLINT">
><cfprocparam type="in" dbvarname="@CDKey" value="#FORM.CDKey#" 
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@Category" value="#FORM.Category#" 
>cfsqltype="CF_SQL_SMALLINT">
><cfprocparam type="in" dbvarname="@Keywords" value="#FORM.Keywords#" 
>cfsqltype="CF_SQL_VARCHAR">
><cfprocparam type="in" dbvarname="@LoanedTo" value="#FORM.LoanedTo#" 
>cfsqltype="CF_SQL_VARCHAR">
></cfstoredproc>
>I always get the following error message:
>
>
>ODBC Error Code = 22005 (Error in assignment)
>
>[Microsoft][ODBC SQL Server Driver]Invalid character value for cast 
>specification
>
>SQL = "sp_UpdateCDROM"
>
>Data Source = "HRDB"
>
>
>
>Is one of cfsqltypes wrong in the cfprocparam tag? Do I need to feed in 
>the sizes of the parameters also? It's odd because other stored procedures 
>that I've written work fine when they are called from Cold Fusion.
>
>
>
>James
>
>
>
>    |   james page   |    database developer       |
>    |   UPC TV interactive   |
>    |   w. +44 (2)0 7533 6573
>    |   [EMAIL PROTECTED]
>
>
>------_=_NextPart_001_01BFDF6D.767FEBEC--
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

--=====================_1833866==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
Try putting the MAXLENGTH attribute on the CFPROCPARAM's that are of type
CF_SQL_VARCHAR.<br>
<br>
Hope this helps<br>
<br>
Nick<br>
<br>
<br>
<br>
At 13:56 26/06/00 +0100, you wrote:<br>
<blockquote type=cite cite>This message is in MIME format. Since your
mail reader does not understand<br>
this format, some or all of this message may not be legible.<br>
<br>
------_=_NextPart_001_01BFDF6D.767FEBEC<br>
Content-Type: text/plain;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>charset=&quot;iso-8859-1&quot;<br>
<br>
I'm looking for a way of updating a SQL Server 7.0 table using a stored
proc<br>
and the CFSTOREDPROC tag in cold fusion.<br>
&nbsp;<br>
Heres the procedure (just a simple update):<br>
&nbsp;<br>
CREATE PROCEDURE sp_UpdateCDROM ( @CDROMID int, @Title varchar(64), 
<br>
&nbsp;@FullTitle varchar(128) = null, <br>
&nbsp;@Supplier varchar(64) = null,<br>
&nbsp;@DiskNo smallint = null,<br>
&nbsp;@CDKey varchar(64) = null,<br>
&nbsp;@Category smallint = null,<br>
&nbsp;@Keywords varchar(256) = null,<br>
&nbsp;@LoanedTo varchar(64) = null) AS<br>
&nbsp;<br>
&nbsp;UPDATE CDCatalog<br>
&nbsp;SET Title = @Title,<br>
&nbsp;&nbsp;&nbsp; FullTitle = @FullTitle,<br>
&nbsp;&nbsp;&nbsp; Keywords = @Keywords,<br>
&nbsp;&nbsp;&nbsp; Supplier = @Supplier,<br>
&nbsp;&nbsp;&nbsp; Category = @Category,<br>
&nbsp;&nbsp;&nbsp; CDKey = @CDKey,<br>
&nbsp;&nbsp;&nbsp; DiskNo = @DiskNo,<br>
&nbsp;&nbsp;&nbsp; LoanedTo = @LoanedTo<br>
&nbsp;WHERE CDROMID = @CDROMID<br>
&nbsp;<br>
And I have verified that this works as intended by testing in the
Query<br>
Analyzer. However, when I come to use the CFSTOREDPROC tag, like
this:<br>
&nbsp;<br>
&lt;cfstoredproc procedure=&quot;sp_UpdateCDROM&quot;
datasource=&quot;HRDB&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@CDROMID&quot;
value=&quot;#FORM.CDROMID#&quot;<br>
cfsqltype=&quot;CF_SQL_INTEGER&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Title&quot;
value=&quot;#FORM.Title#&quot;<br>
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@FullTitle&quot;
value=&quot;#FORM.FullTitle#&quot;<br>
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Supplier&quot;
value=&quot;#FORM.Supplier#&quot;<br>
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@DiskNo&quot;
value=&quot;#FORM.DiskNo#&quot;<br>
cfsqltype=&quot;CF_SQL_SMALLINT&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@CDKey&quot;
value=&quot;#FORM.CDKey#&quot;<br>
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Category&quot;
value=&quot;#FORM.Category#&quot;<br>
cfsqltype=&quot;CF_SQL_SMALLINT&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Keywords&quot;
value=&quot;#FORM.Keywords#&quot;<br>
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@LoanedTo&quot;
value=&quot;#FORM.LoanedTo#&quot;<br>
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;/cfstoredproc&gt;<br>
<br>
I always get the following error message:<br>
&nbsp;<br>
ODBC Error Code = 22005 (Error in assignment) <br>
<br>
<br>
<br>
[Microsoft][ODBC SQL Server Driver]Invalid character value for cast<br>
specification <br>
<br>
<br>
<br>
SQL = &quot;sp_UpdateCDROM&quot; <br>
<br>
<br>
Data Source = &quot;HRDB&quot;<br>
<br>
&nbsp;<br>
<br>
Is one of cfsqltypes wrong in the cfprocparam tag? Do I need to feed in
the<br>
sizes of the parameters also? It's odd because other stored procedures
that<br>
I've written work fine when they are called from Cold Fusion.<br>
<br>
&nbsp;<br>
<br>
James<br>
<br>
&nbsp;<br>
<br>
&nbsp;&nbsp; |&nbsp;&nbsp; james page&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;
database developer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <br>
&nbsp;&nbsp; |&nbsp;&nbsp; UPC TV interactive&nbsp;&nbsp; |&nbsp; <br>
&nbsp;&nbsp; |&nbsp;&nbsp; w. +44 (2)0 7533 6573 <br>
&nbsp;&nbsp; |&nbsp;&nbsp; [EMAIL PROTECTED] <br>
<br>
&nbsp;<br>
<br>
------_=_NextPart_001_01BFDF6D.767FEBEC<br>
Content-Type: text/html;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>charset=&quot;iso-8859-1&quot;<br>
<br>
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0
Transitional//EN&quot;&gt;<br>
<font face="arial" size=2>I'm looking for a way of updating a SQL Server
7.0 table using a stored proc and the CFSTOREDPROC tag in cold
fusion.</font><br>
&nbsp;<br>
<font face="arial" size=2>Heres the procedure (just a simple
update):</font><br>
&nbsp;<br>
<font face="arial" size=2>CREATE PROCEDURE sp_UpdateCDROM ( @CDROMID int,
@Title varchar(64), <br>
&nbsp;@FullTitle varchar(128) = null, <br>
&nbsp;@Supplier varchar(64) = null,<br>
&nbsp;@DiskNo smallint = null,<br>
&nbsp;@CDKey varchar(64) = null,<br>
&nbsp;@Category smallint = null,<br>
&nbsp;@Keywords varchar(256) = null,<br>
&nbsp;@LoanedTo varchar(64) = null) AS</font><br>
&nbsp;<br>
<font face="arial" size=2>&nbsp;UPDATE CDCatalog<br>
&nbsp;SET Title = @Title,<br>
&nbsp;&nbsp;&nbsp; FullTitle = @FullTitle,<br>
&nbsp;&nbsp;&nbsp; Keywords = @Keywords,<br>
&nbsp;&nbsp;&nbsp; Supplier = @Supplier,<br>
&nbsp;&nbsp;&nbsp; Category = @Category,<br>
&nbsp;&nbsp;&nbsp; CDKey = @CDKey,<br>
&nbsp;&nbsp;&nbsp; DiskNo = @DiskNo,<br>
&nbsp;&nbsp;&nbsp; LoanedTo = @LoanedTo<br>
&nbsp;WHERE CDROMID = @CDROMID</font><br>
&nbsp;<br>
<font face="arial" size=2>And I have verified that this works as intended
by testing in the Query Analyzer. However, when I come to use the
CFSTOREDPROC tag, like this:</font><br>
&nbsp;<br>
<font face="arial" size=2>&lt;cfstoredproc
procedure=&quot;sp_UpdateCDROM&quot; 
datasource=&quot;HRDB&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@CDROMID&quot;
value=&quot;#FORM.CDROMID#&quot;
cfsqltype=&quot;CF_SQL_INTEGER&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Title&quot;
value=&quot;#FORM.Title#&quot;
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@FullTitle&quot;
value=&quot;#FORM.FullTitle#&quot;
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Supplier&quot;
value=&quot;#FORM.Supplier#&quot;
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@DiskNo&quot;
value=&quot;#FORM.DiskNo#&quot;
cfsqltype=&quot;CF_SQL_SMALLINT&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@CDKey&quot;
value=&quot;#FORM.CDKey#&quot;
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Category&quot;
value=&quot;#FORM.Category#&quot;
cfsqltype=&quot;CF_SQL_SMALLINT&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@Keywords&quot;
value=&quot;#FORM.Keywords#&quot;
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;cfprocparam type=&quot;in&quot; dbvarname=&quot;@LoanedTo&quot;
value=&quot;#FORM.LoanedTo#&quot;
cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;<br>
&lt;/cfstoredproc&gt;<br>
I always get the following error message:</font><br>
&nbsp;<br>
<br>
<font face="arial" size=2>ODBC Error Code = 22005 (Error in assignment)
</font><br>
<br>
<font face="arial" size=2>[Microsoft][ODBC SQL Server Driver]Invalid
character value for cast specification </font><br>
<br>
<font face="arial" size=2>SQL = &quot;sp_UpdateCDROM&quot; </font><br>
<br>
<font face="arial" size=2>Data Source = &quot;HRDB&quot;<br>
</font><br>
&nbsp;<br>
<br>
<font face="arial" size=2>Is one of cfsqltypes wrong in the cfprocparam
tag? Do I need to feed in the sizes of the parameters also? It's odd
because other stored procedures that I've written work fine when they are
called from Cold Fusion.<br>
</font><br>
&nbsp;<br>
<br>
<font face="arial" size=2>James<br>
</font><br>
&nbsp;<br>
<br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp; |&nbsp;&nbsp; james
page&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; database
developer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</font> <br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp; |&nbsp;&nbsp; UPC
TV interactive&nbsp;&nbsp; |&nbsp; </font><br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp; |&nbsp;&nbsp; w.
+44 (2)0 7533 6573</font> <br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp; |&nbsp;&nbsp;
[EMAIL PROTECTED]</font> <br>
&nbsp;<br>
<br>
------_=_NextPart_001_01BFDF6D.767FEBEC--<br>
------------------------------------------------------------------------------<br>
Archives:
<a href="http://www.egroups.com/list/cf-talk" 
eudora="autourl">http://www.eGroups.com/list/cf-talk</a><br>
To Unsubscribe visit
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 
</blockquote></html>

--=====================_1833866==_.ALT--

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to