--=====================_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> </x-tab>charset="iso-8859-1"<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>
<br>
Heres the procedure (just a simple update):<br>
<br>
CREATE PROCEDURE sp_UpdateCDROM ( @CDROMID int, @Title varchar(64),
<br>
@FullTitle varchar(128) = null, <br>
@Supplier varchar(64) = null,<br>
@DiskNo smallint = null,<br>
@CDKey varchar(64) = null,<br>
@Category smallint = null,<br>
@Keywords varchar(256) = null,<br>
@LoanedTo varchar(64) = null) AS<br>
<br>
UPDATE CDCatalog<br>
SET Title = @Title,<br>
FullTitle = @FullTitle,<br>
Keywords = @Keywords,<br>
Supplier = @Supplier,<br>
Category = @Category,<br>
CDKey = @CDKey,<br>
DiskNo = @DiskNo,<br>
LoanedTo = @LoanedTo<br>
WHERE CDROMID = @CDROMID<br>
<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>
<br>
<cfstoredproc procedure="sp_UpdateCDROM"
datasource="HRDB"><br>
<cfprocparam type="in" dbvarname="@CDROMID"
value="#FORM.CDROMID#"<br>
cfsqltype="CF_SQL_INTEGER"><br>
<cfprocparam type="in" dbvarname="@Title"
value="#FORM.Title#"<br>
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@FullTitle"
value="#FORM.FullTitle#"<br>
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@Supplier"
value="#FORM.Supplier#"<br>
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@DiskNo"
value="#FORM.DiskNo#"<br>
cfsqltype="CF_SQL_SMALLINT"><br>
<cfprocparam type="in" dbvarname="@CDKey"
value="#FORM.CDKey#"<br>
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@Category"
value="#FORM.Category#"<br>
cfsqltype="CF_SQL_SMALLINT"><br>
<cfprocparam type="in" dbvarname="@Keywords"
value="#FORM.Keywords#"<br>
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@LoanedTo"
value="#FORM.LoanedTo#"<br>
cfsqltype="CF_SQL_VARCHAR"><br>
</cfstoredproc><br>
<br>
I always get the following error message:<br>
<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 = "sp_UpdateCDROM" <br>
<br>
<br>
Data Source = "HRDB"<br>
<br>
<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>
<br>
<br>
James<br>
<br>
<br>
<br>
| james page |
database developer | <br>
| UPC TV interactive | <br>
| w. +44 (2)0 7533 6573 <br>
| [EMAIL PROTECTED] <br>
<br>
<br>
<br>
------_=_NextPart_001_01BFDF6D.767FEBEC<br>
Content-Type: text/html;<br>
<x-tab> </x-tab>charset="iso-8859-1"<br>
<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN"><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>
<br>
<font face="arial" size=2>Heres the procedure (just a simple
update):</font><br>
<br>
<font face="arial" size=2>CREATE PROCEDURE sp_UpdateCDROM ( @CDROMID int,
@Title varchar(64), <br>
@FullTitle varchar(128) = null, <br>
@Supplier varchar(64) = null,<br>
@DiskNo smallint = null,<br>
@CDKey varchar(64) = null,<br>
@Category smallint = null,<br>
@Keywords varchar(256) = null,<br>
@LoanedTo varchar(64) = null) AS</font><br>
<br>
<font face="arial" size=2> UPDATE CDCatalog<br>
SET Title = @Title,<br>
FullTitle = @FullTitle,<br>
Keywords = @Keywords,<br>
Supplier = @Supplier,<br>
Category = @Category,<br>
CDKey = @CDKey,<br>
DiskNo = @DiskNo,<br>
LoanedTo = @LoanedTo<br>
WHERE CDROMID = @CDROMID</font><br>
<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>
<br>
<font face="arial" size=2><cfstoredproc
procedure="sp_UpdateCDROM"
datasource="HRDB"><br>
<cfprocparam type="in" dbvarname="@CDROMID"
value="#FORM.CDROMID#"
cfsqltype="CF_SQL_INTEGER"><br>
<cfprocparam type="in" dbvarname="@Title"
value="#FORM.Title#"
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@FullTitle"
value="#FORM.FullTitle#"
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@Supplier"
value="#FORM.Supplier#"
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@DiskNo"
value="#FORM.DiskNo#"
cfsqltype="CF_SQL_SMALLINT"><br>
<cfprocparam type="in" dbvarname="@CDKey"
value="#FORM.CDKey#"
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@Category"
value="#FORM.Category#"
cfsqltype="CF_SQL_SMALLINT"><br>
<cfprocparam type="in" dbvarname="@Keywords"
value="#FORM.Keywords#"
cfsqltype="CF_SQL_VARCHAR"><br>
<cfprocparam type="in" dbvarname="@LoanedTo"
value="#FORM.LoanedTo#"
cfsqltype="CF_SQL_VARCHAR"><br>
</cfstoredproc><br>
I always get the following error message:</font><br>
<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 = "sp_UpdateCDROM" </font><br>
<br>
<font face="arial" size=2>Data Source = "HRDB"<br>
</font><br>
<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>
<br>
<br>
<font face="arial" size=2>James<br>
</font><br>
<br>
<br>
<font face="Courier New, Courier" size=2> | james
page | database
developer |</font> <br>
<font face="Courier New, Courier" size=2> | UPC
TV interactive | </font><br>
<font face="Courier New, Courier" size=2> | w.
+44 (2)0 7533 6573</font> <br>
<font face="Courier New, Courier" size=2> |
[EMAIL PROTECTED]</font> <br>
<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&body=lists/cf_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&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.