jharnisch74
03-21-2006, 02:03 PM
Hi,
I am receiving the following error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near ','.
/signup.asp, line 38
I cannot not seem to figure out what is wrong. I would appreciate any suggestions. Here is the code:
<!-- #include file = "Include/ADOConn.asp" -->
<%
if(Request.form("action") = "signup") then
email = Request.Form("email")
password = Request.Form("password")
fname = Request.Form("first_name")
lname = Request.Form("last_name")
ph_area = Request.Form("p_area")
ph_ex = Request.Form("p_exchange")
ph_num = Request.Form("p_number")
fax_area = Request.Form("f_area")
fax_ex = Request.Form("f_exchange")
fax_num = Request.Form("f_number")
bus_name = Request.Form("name")
tax_id = Request.Form("tax_id")
set rs1 = server.createobject("ADODB.Recordset")
set rs1 = adoconn.Execute("select * from user_info order by userid desc")
if(rs1.eof and rs1.bof) then
userid = 1
else
rs1.movefirst
userid = cint(rs1("userid")) + 1
end if
Set rs1 = Nothing
promo_code = ""
address1 = ""
address2 = ""
city = ""
state1 = ""
zip_code = ""
country = ""
print_name = ""
print_phone = ""
fee = ""
auto_tab = ""
sql= "insert into user_info values("& userid &",'"& password &"','"& promo_code &"','"& email &"','"& bus_name &"','"& fname &"','"& lname &"',"& ph_area &","& ph_ex &","& ph_num &","& fax_area &","& fax_ex &","& fax_num &",'"& address1 &"','"& address2 &"','"& city &"','"& state1 &"',0,'"& country &"','"& tax_id &"','"& print_name &"','"& print_phone &"',0,'"& auto_tab &"','active')"
set rs = server.createobject("ADODB.Recordset")
set rs = adoconn.Execute(sql)
session("userid") = userid
session("username") = bus_name
Set RS = Nothing
Response.Redirect("signup2.asp")
end if
%>
<!-- Start header -->
<!-- #include file = "header1.asp" -->
<!-- End header -->
<SCRIPT language=JavaScript>
var helpWin = null;
var termsWin = null;
function doHelp()
{
if ( helpWin )
{
helpWin.close();
}
helpWin = window.open( 'trial1_h.htm', '', 'toolbar=no,location=no,resizable=yes,height=450,width=500,scrollbars=yes')
}
function do_alert( fld, msg )
{
alert( 'Please enter ' + msg + '.' );
fld.focus();
fld.select();
return ( false );
}
function validate( f )
{
var phone_msg = 'a complete phone number';
var phone_num = f.p_area.value + f.p_exchange.value + f.p_number.value;
if ( !f.email.value.length ) return ( do_alert( f.email, 'an email address' ) );
if ( !f.password.value.length ) return ( do_alert( f.password, 'a password' ) );
if ( !f.confirm_password.value.length ) return ( do_alert( f.confirm_password, 'a confirmation password' ) );
if ( !f.first_name.value.length ) return ( do_alert( f.first_name, 'your first name' ) );
if ( !f.last_name.value.length ) return ( do_alert( f.last_name, 'your last name' ) );
if ( f.p_area.value.length != 3 ) return ( do_alert( f.p_area, phone_msg ) );
if ( f.p_exchange.value.length != 3 ) return ( do_alert( f.p_exchange, phone_msg ) );
if ( f.p_number.value.length != 4 ) return ( do_alert( f.p_number, phone_msg ) );
if ( !isNumeric( phone_num ) )
{
alert( 'Phone number must be all numbers.' );
f.p_area.focus();
f.p_area.select();
return ( false );
}
if ( f.password.value != f.confirm_password.value )
{
alert( 'Password and confirm-password do not match.' );
f.password.focus();
f.password.select();
return ( false );
}
if ( !isValidEmail( f.email.value ) )
{
alert( 'Please enter a valid email address.' );
f.email.focus();
f.email.select();
return ( false );
}
if ( !f.read_agreement.checked )
{
alert( 'Please acknowledge agreement with Terms of Service.' );
f.read_agreement.focus();
return ( false );
}
return ( true );
}
function isNumeric( str )
{
var ValidChars = "0123456789";
var Char;
for ( var i = 0; i < str.length; i++ )
{
Char = str.charAt(i);
if ( ValidChars.indexOf( Char ) == -1 )
{
return ( false );
}
}
return ( true );
}
function isValidEmail( str )
{
return ( str.indexOf( "." ) > 2 ) && ( str.indexOf( "@" ) > 0 );
}
function showTermsOfService()
{
if ( termsWin && !termsWin.closed )
{
termsWin.close();
}
termsWin = window.open( "terms_of_service_w.htm", '', 'toolbar=yes,resizable=yes,height=600,width=700,scrollbars=yes')
}
</SCRIPT>
<!-- Start body -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD align=right width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
<TBODY>
<TR>
<TD width="42%">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD height=25><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=5 border=0>
<TBODY>
<TR>
<TD>
<P>The subscription cost is only $12.45 per month with a
one-year commitment. Less than a quarter of an average
signing fee! </P>
<P>You can receive 1 month FREE by pre-paying $136.95
for the full year. </P>
<P>Any subscriber not completely satisfied with the
NotaryListings.com service may cancel his or her
subscription within the first 90 days.<BR><BR>
<DIV align=right><A
href="javascript:showCancellationPolicy();">Cancellation
Policy</A></DIV><BR>
<P></P></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=left>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=100 height=72>
</TD>
<TD vAlign=center align=middle><IMG height=34 alt=""
src="images/cards_color.gif"
width=193
border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD width="2%"> </TD>
<TD width="56%">
<FORM name=signup onSubmit="return validate(this);"
action=signup.asp method=post><INPUT type=hidden value=signup
name=action>
<TABLE cellSpacing=1 cellPadding=20 width="100%" bgColor=#bcbcb2
border=0>
<TBODY>
<TR>
<TD bgColor=#f7f7ee><BR>
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
<TBODY>
<TR>
<TD style="COLOR: #333333">Email address:</TD>
<TD> </TD>
<TD><INPUT maxLength=255 name=email>* </TD></TR>
<TR>
<TD style="COLOR: #333333">Password:</TD>
<TD> </TD>
<TD><INPUT type=password maxLength=20 name=password>*
</TD></TR>
<TR>
<TD style="COLOR: #333333">Confirm password:</TD>
<TD> </TD>
<TD><INPUT type=password maxLength=20
name=confirm_password>* </TD></TR>
<TR>
<TD colSpan=3 height=5><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD style="COLOR: #333333">First name:</TD>
<TD> </TD>
<TD><INPUT maxLength=20 name=first_name>* </TD></TR>
<TR>
<TD style="COLOR: #333333">Last name:</TD>
<TD> </TD>
<TD><INPUT maxLength=20 name=last_name>* </TD></TR>
<TR>
<TD colSpan=3 height=5><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD style="COLOR: #333333">Phone:</TD>
<TD align=right>(</TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD><INPUT maxLength=3 size=3 name=p_area>)</TD>
<TD><INPUT maxLength=3 size=3 name=p_exchange></TD>
<TD>-<INPUT maxLength=4 size=4
name=p_number>*</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD style="COLOR: #333333">Fax:</TD>
<TD align=right>(</TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD><INPUT maxLength=3 size=3 name=f_area>)</TD>
<TD><INPUT maxLength=3 size=3 name=f_exchange></TD>
<TD>-<INPUT maxLength=4 size=4
name=f_number></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=3 height=5><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD style="COLOR: #333333">Company name:</TD>
<TD> </TD>
<TD><INPUT maxLength=40 name=name> </TD></TR>
<TR>
<TD style="COLOR: #333333">Tax ID:</TD>
<TD class=body> </TD>
<TD><INPUT maxLength=20 name=tax_id> </TD></TR>
<TR>
<TD style="COLOR: #333333">Promo Code:</TD>
<TD> </TD>
<TD><INPUT maxLength=20 size=12 name=code> </TD></TR>
<TR>
<TD align=right colSpan=3><BR>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD>I agree to these <A
href="javascript:showTermsOfService();">Terms of
Service</A>. </TD>
<TD vAlign=top><INPUT class=inputNoBorder
type=checkbox name=read_agreement>
</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=3>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD align=left colSpan=2><A
href="javascript:doHelp()"><IMG height=12
alt="Click here for help"
src="images/help.gif"
width=10 align=absMiddle border=0></A> <B
style="COLOR: #333333">Help</B> </TD></TR>
<TR>
<TD> </TD>
<TD align=right><B
style="COLOR: #333333">Next</B> <INPUT
class=inputNoBorder type=image height=15
alt="Press here to go to step 2" width=18
src="images/arrow_right-brown.gif"
align=absMiddle border=0>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE>
</FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!-- End body -->
<SCRIPT language=javascript>
document.signup.email.select();
document.signup.email.focus();
</SCRIPT>
<!-- Start footer --><!-- #include file = "footer.asp" --><!-- End footer -->
I am receiving the following error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near ','.
/signup.asp, line 38
I cannot not seem to figure out what is wrong. I would appreciate any suggestions. Here is the code:
<!-- #include file = "Include/ADOConn.asp" -->
<%
if(Request.form("action") = "signup") then
email = Request.Form("email")
password = Request.Form("password")
fname = Request.Form("first_name")
lname = Request.Form("last_name")
ph_area = Request.Form("p_area")
ph_ex = Request.Form("p_exchange")
ph_num = Request.Form("p_number")
fax_area = Request.Form("f_area")
fax_ex = Request.Form("f_exchange")
fax_num = Request.Form("f_number")
bus_name = Request.Form("name")
tax_id = Request.Form("tax_id")
set rs1 = server.createobject("ADODB.Recordset")
set rs1 = adoconn.Execute("select * from user_info order by userid desc")
if(rs1.eof and rs1.bof) then
userid = 1
else
rs1.movefirst
userid = cint(rs1("userid")) + 1
end if
Set rs1 = Nothing
promo_code = ""
address1 = ""
address2 = ""
city = ""
state1 = ""
zip_code = ""
country = ""
print_name = ""
print_phone = ""
fee = ""
auto_tab = ""
sql= "insert into user_info values("& userid &",'"& password &"','"& promo_code &"','"& email &"','"& bus_name &"','"& fname &"','"& lname &"',"& ph_area &","& ph_ex &","& ph_num &","& fax_area &","& fax_ex &","& fax_num &",'"& address1 &"','"& address2 &"','"& city &"','"& state1 &"',0,'"& country &"','"& tax_id &"','"& print_name &"','"& print_phone &"',0,'"& auto_tab &"','active')"
set rs = server.createobject("ADODB.Recordset")
set rs = adoconn.Execute(sql)
session("userid") = userid
session("username") = bus_name
Set RS = Nothing
Response.Redirect("signup2.asp")
end if
%>
<!-- Start header -->
<!-- #include file = "header1.asp" -->
<!-- End header -->
<SCRIPT language=JavaScript>
var helpWin = null;
var termsWin = null;
function doHelp()
{
if ( helpWin )
{
helpWin.close();
}
helpWin = window.open( 'trial1_h.htm', '', 'toolbar=no,location=no,resizable=yes,height=450,width=500,scrollbars=yes')
}
function do_alert( fld, msg )
{
alert( 'Please enter ' + msg + '.' );
fld.focus();
fld.select();
return ( false );
}
function validate( f )
{
var phone_msg = 'a complete phone number';
var phone_num = f.p_area.value + f.p_exchange.value + f.p_number.value;
if ( !f.email.value.length ) return ( do_alert( f.email, 'an email address' ) );
if ( !f.password.value.length ) return ( do_alert( f.password, 'a password' ) );
if ( !f.confirm_password.value.length ) return ( do_alert( f.confirm_password, 'a confirmation password' ) );
if ( !f.first_name.value.length ) return ( do_alert( f.first_name, 'your first name' ) );
if ( !f.last_name.value.length ) return ( do_alert( f.last_name, 'your last name' ) );
if ( f.p_area.value.length != 3 ) return ( do_alert( f.p_area, phone_msg ) );
if ( f.p_exchange.value.length != 3 ) return ( do_alert( f.p_exchange, phone_msg ) );
if ( f.p_number.value.length != 4 ) return ( do_alert( f.p_number, phone_msg ) );
if ( !isNumeric( phone_num ) )
{
alert( 'Phone number must be all numbers.' );
f.p_area.focus();
f.p_area.select();
return ( false );
}
if ( f.password.value != f.confirm_password.value )
{
alert( 'Password and confirm-password do not match.' );
f.password.focus();
f.password.select();
return ( false );
}
if ( !isValidEmail( f.email.value ) )
{
alert( 'Please enter a valid email address.' );
f.email.focus();
f.email.select();
return ( false );
}
if ( !f.read_agreement.checked )
{
alert( 'Please acknowledge agreement with Terms of Service.' );
f.read_agreement.focus();
return ( false );
}
return ( true );
}
function isNumeric( str )
{
var ValidChars = "0123456789";
var Char;
for ( var i = 0; i < str.length; i++ )
{
Char = str.charAt(i);
if ( ValidChars.indexOf( Char ) == -1 )
{
return ( false );
}
}
return ( true );
}
function isValidEmail( str )
{
return ( str.indexOf( "." ) > 2 ) && ( str.indexOf( "@" ) > 0 );
}
function showTermsOfService()
{
if ( termsWin && !termsWin.closed )
{
termsWin.close();
}
termsWin = window.open( "terms_of_service_w.htm", '', 'toolbar=yes,resizable=yes,height=600,width=700,scrollbars=yes')
}
</SCRIPT>
<!-- Start body -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD align=right width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
<TBODY>
<TR>
<TD width="42%">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD height=25><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=5 border=0>
<TBODY>
<TR>
<TD>
<P>The subscription cost is only $12.45 per month with a
one-year commitment. Less than a quarter of an average
signing fee! </P>
<P>You can receive 1 month FREE by pre-paying $136.95
for the full year. </P>
<P>Any subscriber not completely satisfied with the
NotaryListings.com service may cancel his or her
subscription within the first 90 days.<BR><BR>
<DIV align=right><A
href="javascript:showCancellationPolicy();">Cancellation
Policy</A></DIV><BR>
<P></P></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=left>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=100 height=72>
</TD>
<TD vAlign=center align=middle><IMG height=34 alt=""
src="images/cards_color.gif"
width=193
border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD width="2%"> </TD>
<TD width="56%">
<FORM name=signup onSubmit="return validate(this);"
action=signup.asp method=post><INPUT type=hidden value=signup
name=action>
<TABLE cellSpacing=1 cellPadding=20 width="100%" bgColor=#bcbcb2
border=0>
<TBODY>
<TR>
<TD bgColor=#f7f7ee><BR>
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
<TBODY>
<TR>
<TD style="COLOR: #333333">Email address:</TD>
<TD> </TD>
<TD><INPUT maxLength=255 name=email>* </TD></TR>
<TR>
<TD style="COLOR: #333333">Password:</TD>
<TD> </TD>
<TD><INPUT type=password maxLength=20 name=password>*
</TD></TR>
<TR>
<TD style="COLOR: #333333">Confirm password:</TD>
<TD> </TD>
<TD><INPUT type=password maxLength=20
name=confirm_password>* </TD></TR>
<TR>
<TD colSpan=3 height=5><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD style="COLOR: #333333">First name:</TD>
<TD> </TD>
<TD><INPUT maxLength=20 name=first_name>* </TD></TR>
<TR>
<TD style="COLOR: #333333">Last name:</TD>
<TD> </TD>
<TD><INPUT maxLength=20 name=last_name>* </TD></TR>
<TR>
<TD colSpan=3 height=5><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD style="COLOR: #333333">Phone:</TD>
<TD align=right>(</TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD><INPUT maxLength=3 size=3 name=p_area>)</TD>
<TD><INPUT maxLength=3 size=3 name=p_exchange></TD>
<TD>-<INPUT maxLength=4 size=4
name=p_number>*</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD style="COLOR: #333333">Fax:</TD>
<TD align=right>(</TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD><INPUT maxLength=3 size=3 name=f_area>)</TD>
<TD><INPUT maxLength=3 size=3 name=f_exchange></TD>
<TD>-<INPUT maxLength=4 size=4
name=f_number></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=3 height=5><IMG height=1
src="images/shim.gif"
width=1 border=0></TD></TR>
<TR>
<TD style="COLOR: #333333">Company name:</TD>
<TD> </TD>
<TD><INPUT maxLength=40 name=name> </TD></TR>
<TR>
<TD style="COLOR: #333333">Tax ID:</TD>
<TD class=body> </TD>
<TD><INPUT maxLength=20 name=tax_id> </TD></TR>
<TR>
<TD style="COLOR: #333333">Promo Code:</TD>
<TD> </TD>
<TD><INPUT maxLength=20 size=12 name=code> </TD></TR>
<TR>
<TD align=right colSpan=3><BR>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD>I agree to these <A
href="javascript:showTermsOfService();">Terms of
Service</A>. </TD>
<TD vAlign=top><INPUT class=inputNoBorder
type=checkbox name=read_agreement>
</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=3>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD align=left colSpan=2><A
href="javascript:doHelp()"><IMG height=12
alt="Click here for help"
src="images/help.gif"
width=10 align=absMiddle border=0></A> <B
style="COLOR: #333333">Help</B> </TD></TR>
<TR>
<TD> </TD>
<TD align=right><B
style="COLOR: #333333">Next</B> <INPUT
class=inputNoBorder type=image height=15
alt="Press here to go to step 2" width=18
src="images/arrow_right-brown.gif"
align=absMiddle border=0>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE>
</FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!-- End body -->
<SCRIPT language=javascript>
document.signup.email.select();
document.signup.email.focus();
</SCRIPT>
<!-- Start footer --><!-- #include file = "footer.asp" --><!-- End footer -->