ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old June 7th, 2004, 02:47 PM
crownjewel82's Avatar
crownjewel82 crownjewel82 is offline
rebel with a cause
Dev Shed God (5000 - 5499 posts)
 
Join Date: May 2004
Location: The Batsh!t Crazy State.
Posts: 5,283 crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 29591 Folding Title: Starter FolderFolding Points: 29591 Folding Title: Starter Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 19 h 4 m 2 sec
Reputation Power: 1721
Question SQL error while inserting into table

I'm having a problem with inserting information into a database. I'm using a standard cfquery but i keep getting a generic database query error. This is the section of code the error is coming from.

<cfquery name="insert" datasource="#Request.DSN#">
INSERT INTO VEHICLE VALUES{
#RandRange(1000, 9999)#,
#Form.name#,
'default',
#Form.address#,
#Form.email#,
#Form.phone#,
'00',
'none'
}
</cfquery>

The error message looks like this
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

The error occurred in D:\wwwsites\rattlercarcom\www\processreservation.cfm: line 31

29 : #Form.address#,
30 : #Form.email#,
31 : #Form.phone#,
32 : '00',
33 : 'none'



--------------------------------------------------------------------------------

SQL INSERT INTO VEHICLE VALUES{ 5439, sdfklaj, 'default', sdflj;, dsafj, 3838383, '00', 'none' }
DATASOURCE rattlercarcom434
VENDORERRORCODE -3502
SQLSTATE 42000

Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Remote Address 68.84.22.107
Referrer http://www.rattlercar.com/reserveve...87FA3DD09D89E19
Date/Time 07-Jun-04 03:38 PM

I've spent an hour looking at this and I guess i'm just to close to the project to see the error. Any help would be greatly appreciated.

Reply With Quote
  #2  
Old June 7th, 2004, 06:33 PM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 55 m 17 sec
Reputation Power: 17
strings need to be enclosed in single quotes, eg '#Form.address#,' and that should be a normal bracket, not curly

Reply With Quote
  #3  
Old June 8th, 2004, 06:24 AM
crownjewel82's Avatar
crownjewel82 crownjewel82 is offline
rebel with a cause
Dev Shed God (5000 - 5499 posts)
 
Join Date: May 2004
Location: The Batsh!t Crazy State.
Posts: 5,283 crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 29591 Folding Title: Starter FolderFolding Points: 29591 Folding Title: Starter Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 19 h 4 m 2 sec
Reputation Power: 1721
Smile

Thanks alot I knew it was something simple like that i just didnt know what

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > SQL error while inserting into table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway