|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
||||
|
||||
|
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. |
|
#2
|
|||
|
|||
|
strings need to be enclosed in single quotes, eg '#Form.address#,' and that should be a normal bracket, not curly
|
|
#3
|
||||
|
||||
|
Thanks alot I knew it was something simple like that i just didnt know what
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > SQL error while inserting into table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|