I have one oddball query that sometimes works and sometimes doesn't, but I 
can't figure out why it only fails sometimes and not all the time.  I've 
got it set up in the application with a CFTRY so that when it fails CFCATCH 
sends me the query in an email, then I can cut and paste it into a SQL 
Server query window and it will work every time.  I thought I might be 
using a Reserved Word accidentally, but even DateTimeStamp is not on the 
Reserved Words list on Books Online.  I'm using CF MX 6.1 and SQL Server 
2000.  Here is the query, the error messages generated, and the structure 
of the table it populates:

    INSERT INTO BounceBackGiftCertLog
    (
    OrderNo,
    EntityID,
    Email,
    CustID,
    QualifiedOrderAmt,
    GiftCertThreshold,
    DateTimeStamp,
    FraudYN,
    ActiveYN
    )
    VALUES
    (
    1077637,
    2582,
    '[EMAIL PROTECTED]',  <!--- I only modified this one line for 
privacy --->
    '339341312140021115571479520041213143933222',
    $3,177.21,
    $120.00,
    '12/13/2004 07:02:46 PM',
    0,
    1
    )

ERROR REPORTED BY COLDFUSION:
cfcatch.message = Error Executing Database Query.

Detail: [Macromedia][SQLServer JDBC Driver][SQLServer]There are fewer 
columns in the INSERT statement than values specified in the VALUES clause. 
The number of values in the VALUES clause must match the number of columns 
specified in the INSERT statement.  (Except that the damn query works just 
fine if I cut and paste it into SQL Server, so this has got to be a bogus 
message).

Here is the table structure:

/****** Object:  Table [dbo].[BounceBackGiftCertLog]    Script Date: 
12/13/04 8:41:47 PM ******/
CREATE TABLE [dbo].[BounceBackGiftCertLog] (
        [ID] [int] IDENTITY (1, 1) NOT NULL ,
        [OrderNo] [int] NULL ,
        [EntityID] [int] NULL ,
        [Email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
        [CustID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
        [QualifiedOrderAmt] [money] NULL ,
        [GiftCertThreshold] [money] NULL ,
        [DateTimeStamp] [datetime] NULL ,
        [FraudYN] [bit] NULL ,
        [ActiveYN] [bit] NULL
) ON [PRIMARY]
GO


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187506
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to