RE: SP pulling my hair out!!!
hasn't anyone heard of ALTER PROCEDURE ;) Anthony Petruzzi Webmaster 954-321-4703 [EMAIL PROTECTED] http://www.sheriff.org -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 10:33 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: SP pulling my hair out!!!
I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
Excellent. I'm glad it's working for you. Yes it is strange. From the command line (query analyzer) you can put '5/26/2002' and SQL will automatically parse it. But the ODBC driver cannot differentiate that syntax from string syntax - it doesn't automatically parse it as a date just because you've identified it as a date. I've always thought that was a bit of an oversite. mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:54 AM To: CF-Talk Subject: Re: SP pulling my hair out!!! I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: SP pulling my hair out!!!
I receive this error when I readded it: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with int Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 11:07 AM Subject: RE: SP pulling my hair out!!! Excellent. I'm glad it's working for you. Yes it is strange. From the command line (query analyzer) you can put '5/26/2002' and SQL will automatically parse it. But the ODBC driver cannot differentiate that syntax from string syntax - it doesn't automatically parse it as a date just because you've identified it as a date. I've always thought that was a bit of an oversite. mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:54 AM To: CF-Talk Subject: Re: SP pulling my hair out!!! I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: SP pulling my hair out!!!
Anyone have any code samples of CFSTOREDPROC and date usage. I just can't get it to work! Neil - Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 2:19 PM Subject: Re: SP pulling my hair out!!! I receive this error when I readded it: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with int Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 11:07 AM Subject: RE: SP pulling my hair out!!! Excellent. I'm glad it's working for you. Yes it is strange. From the command line (query analyzer) you can put '5/26/2002' and SQL will automatically parse it. But the ODBC driver cannot differentiate that syntax from string syntax - it doesn't automatically parse it as a date just because you've identified it as a date. I've always thought that was a bit of an oversite. mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:54 AM To: CF-Talk Subject: Re: SP pulling my hair out!!! I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil
Re: SP pulling my hair out!!!
Not sure if this has been addressed yet but you should be able to send the date as a CHAR and have SQL determine if its a date: cfprocparam type=In cfsqltype=CF_SQL_CHAR variable=DateValue value=#DateFormat(Now(), mm/dd/)# @DateValue varchar(10) As long as the date is formated properly, SQL will accept a char/varchar as a datetime value. HTH, Chris -- Original Message From: Neil H.[EMAIL PROTECTED] Subject: Re: SP pulling my hair out!!! Date: Tue, 16 Apr 2002 15:05:01 -0400 Anyone have any code samples of CFSTOREDPROC and date usage. I just can't get it to work! Neil - Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 2:19 PM Subject: Re: SP pulling my hair out!!! I receive this error when I readded it: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with int Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 11:07 AM Subject: RE: SP pulling my hair out!!! Excellent. I'm glad it's working for you. Yes it is strange. From the command line (query analyzer) you can put '5/26/2002' and SQL will automatically parse it. But the ODBC driver cannot differentiate that syntax from string syntax - it doesn't automatically parse it as a date just because you've identified it as a date. I've always thought that was a bit of an oversite. mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:54 AM To: CF-Talk Subject: Re: SP pulling my hair out!!! I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify
Re: SP pulling my hair out!!!
It was not addressed and you are the man! How in the world was I supposed to know it has to be CHAR?! That seems so backwards. I guess the CF_SQL_DATE is for another DB server?! Thanks, Neil - Original Message - From: Chris Terrebonne [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 3:14 PM Subject: Re: SP pulling my hair out!!! Not sure if this has been addressed yet but you should be able to send the date as a CHAR and have SQL determine if its a date: cfprocparam type=In cfsqltype=CF_SQL_CHAR variable=DateValue value=#DateFormat(Now(), mm/dd/)# @DateValue varchar(10) As long as the date is formated properly, SQL will accept a char/varchar as a datetime value. HTH, Chris -- Original Message From: Neil H.[EMAIL PROTECTED] Subject: Re: SP pulling my hair out!!! Date: Tue, 16 Apr 2002 15:05:01 -0400 Anyone have any code samples of CFSTOREDPROC and date usage. I just can't get it to work! Neil - Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 2:19 PM Subject: Re: SP pulling my hair out!!! I receive this error when I readded it: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with int Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 11:07 AM Subject: RE: SP pulling my hair out!!! Excellent. I'm glad it's working for you. Yes it is strange. From the command line (query analyzer) you can put '5/26/2002' and SQL will automatically parse it. But the ODBC driver cannot differentiate that syntax from string syntax - it doesn't automatically parse it as a date just because you've identified it as a date. I've always thought that was a bit of an oversite. mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:54 AM To: CF-Talk Subject: Re: SP pulling my hair out!!! I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking
Re: SP pulling my hair out!!!
Glad that helped! SQL is really picky about what you can call a Date but if you call it a Char, SQL is usually pretty good at figuring it out. Chris -- Original Message From: Neil H.[EMAIL PROTECTED] Subject: Re: SP pulling my hair out!!! Date: Tue, 16 Apr 2002 15:40:51 -0400 It was not addressed and you are the man! How in the world was I supposed to know it has to be CHAR?! That seems so backwards. I guess the CF_SQL_DATE is for another DB server?! Thanks, Neil - Original Message - From: Chris Terrebonne [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 3:14 PM Subject: Re: SP pulling my hair out!!! Not sure if this has been addressed yet but you should be able to send the date as a CHAR and have SQL determine if its a date: cfprocparam type=In cfsqltype=CF_SQL_CHAR variable=DateValue value=#DateFormat(Now(), mm/dd/)# @DateValue varchar(10) As long as the date is formated properly, SQL will accept a char/varchar as a datetime value. HTH, Chris -- Original Message From: Neil H.[EMAIL PROTECTED] Subject: Re: SP pulling my hair out!!! Date: Tue, 16 Apr 2002 15:05:01 -0400 Anyone have any code samples of CFSTOREDPROC and date usage. I just can't get it to work! Neil - Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 2:19 PM Subject: Re: SP pulling my hair out!!! I receive this error when I readded it: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with int Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 16, 2002 11:07 AM Subject: RE: SP pulling my hair out!!! Excellent. I'm glad it's working for you. Yes it is strange. From the command line (query analyzer) you can put '5/26/2002' and SQL will automatically parse it. But the ODBC driver cannot differentiate that syntax from string syntax - it doesn't automatically parse it as a date just because you've identified it as a date. I've always thought that was a bit of an oversite. mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:54 AM To: CF-Talk Subject: Re: SP pulling my hair out!!! I have found this to be the problem. So a data formatted 05/26/2002 will not work I have to use CreateODBCDATE to get that to work? That seems dumb :) Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 11:04 PM Subject: RE: SP pulling my hair out!!! Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent
SP pulling my hair out!!!
I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: SP pulling my hair out!!!
cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: SP pulling my hair out!!!
cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
Neil, I usually use #createodbcdatetime(var)# or #createodbcdate(var)# to correctly format the date string. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
Neil, Ok - I will assume that none of your variables are actually numbers (cause that would cause an error as well). I use the Dbvarname on IN variables as well as out variables as in: cfprocparam type=In cfsqltype=CF_SQL_INTEGER dbvarname=Sendall value=1 cfprocparam type=Out cfsqltype=CF_SQL_INTEGER dbvarname=devid variable=Devid This code tells the DB which variable is which and tells me the variable name that will store the return value (#devid#). The other thing I noticed is that you are using CF_SQL_LONGVARCHAR instead of CF_SQL_VARCHAR for some regular character fields. You might try switching that. SQL server demands the variables be passed in the correct order as well (as I'm sure you know). Finally, the other thing I see is your syntax for your setup variables. It should be your create (or alter) statement followed by your parameter list in parentesis as in the following example: ALTER PROCEDURE expense_summary_rpt_filtered ( from_dt datetime, to_dt datetime, uid integer, lname varchar(100) = NULL, fname varchar(100) = NULL, location varchar(50) = NULL, area varchar(50) = NULL, to_level varchar(50) = NULL, department varchar(50) = NULL, job varchar(50) = NULL, job_user1 varchar(50) = NULL, job_user2 varchar(50) = NULL, policy_nbr varchar(50) = NULL, respnse varchar(50) = NULL, overall_status varchar(50) = NULL, move_reason varchar(50) = NULL, new_state varchar(50) = NULL, area_desc varchar(50) = NULL, dept_desc varchar(50) = NULL, sort varchar(50) = NULL, sort2 varchar(50) = 'tid' ) Hope this helps - sometimes these SP's require some trial and error. -Mark __ 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# 3 datetime, This is the culprit. What is the normal way to handle this?! That's not a valid CF variable name. In CF, variable names can consist of letters, numbers and underscores, but the first character can't be a number - I think it has to be a letter. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
Try changing it to: cfsqltype=CF_SQL_TIMESTAMP -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 10:50 PM To: CF-Talk Subject: Re: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! Neil Original Message - From: Neil H. [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:33 PM Subject: Re: SP pulling my hair out!!! cfstoredproc datasource=#DSN# procedure=sp_MYSP cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=1 value=#1# cfprocparam type=In cfsqltype=CF_SQL_MONEY variable=2 value=#2# cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=4 value=#4# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=5 value=#5# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=6 value=#6# cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR variable=7 value=#7# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=8 value=#8# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=9 value=#9# cfprocparam type=In cfsqltype=CF_SQL_INTEGER variable=10 value=#10# cfprocparam type=Out cfsqltype=CF_SQL_INTEGER variable=11 dbvarname=@11 /cfstoredproc IF EXISTS (SELECT name FROM sysobjects WHERE name = 'sp_MYSP' AND type = 'P') DROP PROCEDURE sp_MYSP GO CREATE PROCEDURE sp_MYSP @1 int, @2 money, @3 datetime, @4 int, @5 varchar(100), @6 varchar(30), @7 varchar(30), @8 int, @9 int, @10 int, @11 int OUT Names were changed to protect the innocent Neil - Original Message - From: Mark A. Kruger - CFG [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 15, 2002 10:02 PM Subject: RE: SP pulling my hair out!!! Neil, better post your code - hard to deal with this error without looking at it. Mark -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:46 PM To: CF-Talk Subject: SP pulling my hair out!!! I only have a little hair left so PLEASE throw ideas at me! I get this error: Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. I have tested the SP and it works properly. The stored procedure does exist and I copied and pasted every single variable name from the stored procedure. There is no way the field doesn't exist and I Have counted that the number of variables is identical. What could I be missing!!!? Neil __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SP pulling my hair out!!!
Dave, Yeah - but he said earlier that he changed the names to protect his ap from prying eyes g. ... so I was assuming he has valid variable names. In either case, the error he's getting is returned from the driver - not from CF (according to his earlier post). -mk -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 10:06 PM To: CF-Talk Subject: RE: SP pulling my hair out!!! cfprocparam type=In cfsqltype=CF_SQL_DATE variable=3 value=#3# @3 datetime, This is the culprit. What is the normal way to handle this?! That's not a valid CF variable name. In CF, variable names can consist of letters, numbers and underscores, but the first character can't be a number - I think it has to be a letter. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists