Re: CFStoredProc cfsqltype="cf_sql_Date" doesn't work with SmallDateTime SQL Type...Why?
Although I think the cfsqltype="cf_sql_timestamp" is the correct answer. I found a reference to using it in a reference book also. I still get an error message. Error Diagnostic Information ODBC Error Code = 22008 (Datetime field overflow) [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting datetime from character string. I printed the value out before I called the procedure and it shows the date as 2002-10-15. I have tried to used both the CreateODBCDate(NewDueDate) and DateFormat(NewDueDate, "-mm-dd") but returns the same error message. Any clues because God knows that I'm clueless! Thanks! Gary 8-) - Original Message - From: "Kwang Suh" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, February 07, 2002 3:21 PM Subject: RE: CFStoredProc cfsqltype="cf_sql_Date" doesn't work with SmallDateTime SQL Type...Why? > Try using CF_SQL_TIMESTAMP. > > -Original Message- > From: Gary Ashbaugh [mailto:[EMAIL PROTECTED]] > Sent: February 7, 2002 12:38 PM > To: CF-Talk > Subject: CFStoredProc cfsqltype="cf_sql_Date" doesn't work with > SmallDateTime SQL Type...Why? > > > When I use cf_sql_Date for the cfsqltype with in my cfstoredproc for > a > SmallDateTime SQL field, I get an error...why? > > > ERROR MESSAGE RECEIVED: > > ODBC Error Code = 07001 (Wrong number of parameters) > [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax er > ror, > > > COLDFUSION CODE: > > > ="@FY" > value="#Session.CFY#"> > ="@Due_Date" > value="#DateFormat(NewDueDate, "MM/DD/")#"> > dbvarname="@Contact_Person" value="#Contact_Person#"> > dbvarname="@Contact_Phone" value="#Contact_Phone#"> > ="@RetVal" > variable="FYSetupRetVal"> > ="@RetMsg" > variable="FYSetupRetMsg"> > > > > > SQL STORED PROCEDURE: > > CREATE PROCEDURE [Add_FYSetup] > (@FY nvarchar(4)=NULL, > @Due_Date smalldatetime=NULL, > @Contact_Person nvarchar(50)=NULL, > @Contact_Phone nvarchar(14)=NULL, > @RetVal int = NULL Output, > @RetMsg nvarchar(100) = NULL Output) > > AS... > > Here is the database structure: > > FY nvarchar(4) > Due_Date smalldatetime > Contact_Person nvarchar(50) > Contact_Phone nvarchar(14) > > > > Gary > > _ > _ > Why Share? > Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 > GB > MO/XFER > Instant Activation · $99/Month · Free Setup > http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc > 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 > > __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb 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
CFStoredProc cfsqltype="cf_sql_Date" doesn't work with SmallDateTime SQL Type...Why?
When I use cf_sql_Date for the cfsqltype with in my cfstoredproc for a SmallDateTime SQL field, I get an error...why? ERROR MESSAGE RECEIVED: ODBC Error Code = 07001 (Wrong number of parameters) [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error, COLDFUSION CODE: SQL STORED PROCEDURE: CREATE PROCEDURE [Add_FYSetup] (@FY nvarchar(4)=NULL, @Due_Date smalldatetime=NULL, @Contact_Person nvarchar(50)=NULL, @Contact_Phone nvarchar(14)=NULL, @RetVal int = NULL Output, @RetMsg nvarchar(100) = NULL Output) AS... Here is the database structure: FY nvarchar(4) Due_Date smalldatetime Contact_Person nvarchar(50) Contact_Phone nvarchar(14) Gary __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc 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
OT: Returning Error Message from SQL to ColdFusion
I have a stored procedure that contains several validity checks and raises an error message if it finds it otherwise it updates the record, such as: If @Phone is NULL Select @ErrMsg = @ErrMsg + 'Phone Required. ' If Len(@ErrMsg) > 0 Begin Raiserror (@ErrMsg, 16, 1) Return 1 End I call the stored procedure in ColdFusion, using CFStoredProc tag, such as: MY QUESTION: How can I capture the @ErrMsg used in my SQL Stored Procedure in the CFStoredProc tag? Gary 8-) __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc 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
ODBC Driver Problem
This is a multi-part message in MIME format. --=_NextPart_000_0007_01C04FAD.11E6D190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We are having trouble with a ColdFusion application running on a laptop. = This laptop has Microsoft NT, ColdFusion 4.0, Microsoft Personal Web = Server, Access 97, MDAC 2.1 which shows the Access Driver as = 4.00.4403.02 This very same application is working fine on our server running = Microsoft NT, Microsoft IIS, ColdFusion 4.0, Access 2000, which shows = the Access Driver as version 4.00.4202.00 The error message is an ODBC error and says too few of parameters. Since = the programs and the database files on the laptop are the same ones as = what is on the server I am lost as to what is causing the problem unless = it is the ODBC driver itself. Has anybody else had trouble with this version of the ODBC driver? If = so, what is the work-around? Thank you ahead of time, Gary :-) --=_NextPart_000_0007_01C04FAD.11E6D190 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We are having trouble with a ColdFusion application running on a = laptop. This=20 laptop has Microsoft NT, ColdFusion 4.0, Microsoft Personal Web Server, = Access=20 97, MDAC 2.1 which shows the Access Driver as 4.00.4403.02 This very same application is working fine on our server running = Microsoft=20 NT, Microsoft IIS, ColdFusion 4.0, Access 2000, which shows the Access = Driver as=20 version 4.00.4202.00 The error message is an ODBC error and says too few of parameters. = Since the=20 programs and the database files on the laptop are the same ones as what = is on=20 the server I am lost as to what is causing the problem unless it is the = ODBC=20 driver itself. Has anybody else had trouble with this version of the ODBC driver? If = so,=20 what is the work-around? Thank you ahead of time, Gary :-) --=_NextPart_000_0007_01C04FAD.11E6D190-- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]