Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / December 2005



Tip: Looking for answers? Try searching our database.

Database Syntax

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
confundidisimo - 28 Dec 2005 20:33 GMT
:frown;
Here is what I am trying to do: In the HTML <body>
<cfquery name="InsertCompany" datasource="#Request.MainDSN#"
username="#username#" password="#password#">

INSERT INTO Agency (
Agency_Name,
)

VALUES (
'#Trim(Form.Agency_Name)#',
)
</cfquery>

And here is the msg that is driving me bananas:

Error Executing Database Query.  
Syntax error or access violation: You have an error in your SQL syntax near ')
VALUES ( 'testing from form', )' at line 3  
 
The Error Occurred in
/sphera/accounts/h856w808/var/www/html/h856w808/agency_addAction.cfm: line 18
 
16 : '#Trim(Form.Agency_Name)#',
17 : )
18 : </cfquery>
19 :
 
Can anyone tell me what I am doing wrong? I do not see anything wrong with
this script
JMGibson3 - 28 Dec 2005 20:39 GMT
extra comma in Value list.  You only have 1 item so don't use a comma.  (same situation in column names at top though)
confundidisimo - 28 Dec 2005 20:46 GMT
Amazing! you are right

IT WORKED!!!!

THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU A MILLION TIMES!!!!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.