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!

QUERY ERROR

Status
Not open for further replies.

doctorcoldfusion

Programmer
Sep 16, 2002
14
US
I AM GETTING QUERY ERROR.CAN ANY ONE CORRECT THE SAME FOR ME PLEASE.CODE IS BELOW



<CENTER><H1>POORMANSVOICE<BR>
<a href=&quot;mailto:&quot; style=&quot;position:relative; width:275; filter:glow(color=#0000FF,Strength=1)&quot;><font color=&quot;#000000&quot;>Poormansvoice@aol.com</font></a>
</h1><font size=2 face=&quot;arial,helvetica&quot;>

<cfif IsDefined(&quot;form.name&quot;)>

<cfquery DATASOURCE=&quot;poorman&quot; NAME=&quot;POORMAN&quot;>


Insert into info (name,address,city,state,zip,phone,email,comments)


VALUES (


'#form.name#','#form.address#','#form.city#','#form.state#','#form.zip#','#form.phone#','#form.email#','#form.comments#')


</cfquery>


<cflocation url=&quot;
<div align=&quot;center&quot;>Thank you. Your form has been submitted.></div>

<cfelse>

<form action=&quot;index.cfm&quot; method=&quot;post&quot;>
<table>
<tr><td><font size=2 face=&quot;arial,helvetica&quot;><html>
</head>
<body bgcolor=&quot;#0000FF&quot;><CENTER><h1>You want to serve Kashmiris<br> Fill the form please</h1><br><br color=#04jjjj>
NAME<br><input type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot;><BR>
Address<br><input type=&quot;text&quot; name=&quot;address&quot; value=&quot;&quot;><BR>
City<br><input type=&quot;text&quot; name=&quot;city&quot; value=&quot;&quot;><BR>
State<br><input type=&quot;text&quot; name=&quot;state&quot; value=&quot;&quot;><BR>
Zip<br><br><input type=&quot;text&quot; name=&quot;zip&quot; value=&quot;&quot;><BR>
Phone<br><input type=&quot;text&quot; name=&quot;phone&quot; value=&quot;&quot;><BR>
email<br><input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&quot;><BR>
<center><h3>Comments,Affiliation and Profile</h3><br>
<textarea name=&quot;comments&quot; rows=&quot;&quot; cols=&quot;&quot;></textarea><br>


<input type=&quot;submit&quot;><br><input type=&quot;reset&quot;><br>
</CENTER></body>
</html>

</CFIF>
 
Well.. since I dont know your data types:


1) are they all varchar or text?
(name,address,city,state,zip,phone,email,comments)

If any of them are number... then the '' arounf the variable inserting it would error.

2) Can you copy the error here... it should say whats wrong.

David McIntosh

Let me know if this post helped you...
Please click below: &quot;This Post was Helpful&quot;
 
Yes it is hard to tell without the error message. Maybe your zip field is a number? You are inserting it as a string with the '.

Wes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top