Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can any one help me to correct this

Status
Not open for further replies.

doctorcoldfusion

Programmer
Sep 16, 2002
14
US
Can any one help me to correct this error please.Once I submit form it gives me error mentioned below.Advice please









POORMANSVOICE





Error Occurred While Processing Request
Error Executing Database Query.
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

The Error Occurred in C:\vp\doctorbush.com\POORMANSVOICE.ORG\ line 9

7 : VALUES
8 : ('#form.name#','#form.address#','#form.city#','#form.state#',#form.zip#,#form.phone#,'#form.email#','#form.comments#')
9 : </CFQUERY>
10 :
11 :



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

SQL INSERT INTO info (name,address,city,state,zip,phone,email,comments) VALUES ('','','','',,,'','')
DATASOURCE poorman
VENDORERRORCODE -3502
SQLSTATE 42000

Please Try The Following:

Check the CFML Reference Manual 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 5.5; AOL 7.0; Windows NT 5.0)
Remote Address 64.12.97.11
Referer Date/Time 17-Sep-02 09:47 PM

Stack Trace (click to expand)
at cfindex2ecfm836601371.runPage(C:\vp\doctorbush.com\POORMANSVOICE.ORG\ at cfindex2ecfm836601371.runPage(C:\vp\doctorbush.com\POORMANSVOICE.ORG\

java.sql.SQLException: [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
at com.merant.sequelink.ssp.Diagnostic.toSQLException(Unknown Source)
at com.merant.sequelink.ssp.Chain.cnvDiagnostics(Unknown Source)
at com.merant.sequelink.ssp.Chain.decodeDiagnostic(Unknown Source)
at com.merant.sequelink.ssp.Chain.decodeBody(Unknown Source)
at com.merant.sequelink.ssp.Chain.decode(Unknown Source)
at com.merant.sequelink.ssp.Chain.send(Unknown Source)
at com.merant.sequelink.ctxt.stmt.StatementContext.send(Unknown Source)
at com.merant.sequelink.ctxt.stmt.StmtCtxtState._getDescribeInfo(Unknown Source)
at com.merant.sequelink.ctxt.stmt.CreatedStmtCtxt.getDescribeInfo(Unknown Source)
at com.merant.sequelink.ctxt.stmt.StatementContext.getDescribeInfo(Unknown Source)
at com.merant.sequelink.ctxt.stmt.StmtCtxtState._execDirect(Unknown Source)
at com.merant.sequelink.ctxt.stmt.CreatedStmtCtxt.execDirect(Unknown Source)
at com.merant.sequelink.ctxt.stmt.StatementContext.execDirect(Unknown Source)
at com.merant.sequelink.jdbc.SequeLinkStatement._execute(Unknown Source)
at com.merant.sequelink.jdbc.SequeLinkStatement.execute(Unknown Source)
at jrun.sql.JRunStatement.execute(JRunStatement.java:304)
at coldfusion.sql.Executive.executeQuery(Unknown Source)
at coldfusion.sql.Executive.executeQuery(Unknown Source)
at coldfusion.sql.SqlImpl.execute(Unknown Source)
at coldfusion.tagext.sql.QueryTag.doEndTag(Unknown Source)
at cfindex2ecfm836601371.runPage(C:\vp\doctorbush.com\POORMANSVOICE.ORG\ at coldfusion.runtime.CfJspPage.invoke(Unknown Source)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Unknown Source)
at coldfusion.filter.CfincludeFilter.invoke(Unknown Source)
at coldfusion.filter.ApplicationFilter.invoke(Unknown Source)
at coldfusion.filter.PathFilter.invoke(Unknown Source)
at coldfusion.filter.ExceptionFilter.invoke(Unknown Source)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(Unknown Source)
at coldfusion.filter.BrowserFilter.invoke(Unknown Source)
at coldfusion.filter.GlobalsFilter.invoke(Unknown Source)
at coldfusion.filter.DatasourceFilter.invoke(Unknown Source)
at coldfusion.CfmServlet.service(Unknown Source)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:198)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
 
Check your access settings. Are any fields set to number and you are submitting text (string instead of integer). Are any fields in access set to required=Yes or Allow Zero Length=No? DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Thanks for reply.I HAVE DIVIDED IT INTO TWO QUESTIONS
1-{Check your access settings. Are any fields set to number and you are submitting text (string instead of integer)}

Yes zip and phone in access are set to number and for that purpose the variable of zip and phone in the form has not been kept within commas,that what i know how to set for number in access if we are submitting number .Is there anything else I have to do to fix it.
2-
Are any fields in access set to required=Yes or Allow Zero Length=No?
A-Can you help be to find where to see for required=Yes or Allow Zero Length=No? )
As i only see in access design view at the top
name -data type
BELOW
Field size-long integer
New values-increment
format caption
indexed-YES(no duplicates)

Advice further please


 
Yes I found where exactly
required=Yes or Allow Zero Length=No
My values for each are set to NO
Do i need to change it to yes for requires and no for zero length.
Advice please
 
After trying it on your site and enterig values here is a portion of the error;
SQL INSERT INTO info (name,address,city,state,zip,phone,email,comments) VALUES ('sdfg','sdfg','dsfg','dg','12345','1231231234','asdf@lkjh.com','')
DATASOURCE poorman

Set zip and phone to text and see if that works. DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
The problem is that you are inserting blank data into fields that have allow zero length = NO. If you have a field set to this, then you MUST enter some data into those fields that do not allow a zero length. Otherwise, set allow zero length to YES for the fields that are allowed to be blank.

-Tek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top