chrismartin
06-08-2005, 03:06 PM
Hi there, can someone please help me with this, I keep getting an overflow error and don't know what it means. It is in line 90 which I have highlighted. Any help would be appreciated
<%
FUNCTION fixQuotes( theString )
fixQuotes = REPLACE( theString, "'", "''" )
END FUNCTION
DIM cost
cust_name = TRIM( Request.Form( "cust_name" ) )
address1 = TRIM( Request.Form( "address1" ) )
address2 = TRIM( Request.Form( "address2" ) )
address3 = TRIM( Request.Form( "address3" ) )
postcode = TRIM( Request.Form( "postcode" ) )
email = TRIM( Request.Form( "email" ) )
c_card = TRIM( Request.Form( "c_card" ) )
expiry = TRIM( Request.Form( "expiry" ) )
productid = TRIM( Request.Form( "ProductID" ) )
Dim con, location
Set con = Server.CreateObject("ADODB.Connection")
location = Server.MapPath("db/db.mdb")
con.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & location
sqlString = "INSERT into OrderForms (CustomerName, CustomerAddress1, CustomerAddress2, CustomerAddress3, CustomerPostcode, email, c_card, expiry, ProductID) values ('" &cust_name& "', '" &address1& "','" &address2& "', '" &address3& "', '"&postcode&"', '"&email&"', '"&c_card&"', '"&expiry&"', '" & productid & "')"
Con.Execute sqlString
%>
<%
con.close
%>
<% response.write "The form information was inserted successfully." %>
Thanks
<%
FUNCTION fixQuotes( theString )
fixQuotes = REPLACE( theString, "'", "''" )
END FUNCTION
DIM cost
cust_name = TRIM( Request.Form( "cust_name" ) )
address1 = TRIM( Request.Form( "address1" ) )
address2 = TRIM( Request.Form( "address2" ) )
address3 = TRIM( Request.Form( "address3" ) )
postcode = TRIM( Request.Form( "postcode" ) )
email = TRIM( Request.Form( "email" ) )
c_card = TRIM( Request.Form( "c_card" ) )
expiry = TRIM( Request.Form( "expiry" ) )
productid = TRIM( Request.Form( "ProductID" ) )
Dim con, location
Set con = Server.CreateObject("ADODB.Connection")
location = Server.MapPath("db/db.mdb")
con.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & location
sqlString = "INSERT into OrderForms (CustomerName, CustomerAddress1, CustomerAddress2, CustomerAddress3, CustomerPostcode, email, c_card, expiry, ProductID) values ('" &cust_name& "', '" &address1& "','" &address2& "', '" &address3& "', '"&postcode&"', '"&email&"', '"&c_card&"', '"&expiry&"', '" & productid & "')"
Con.Execute sqlString
%>
<%
con.close
%>
<% response.write "The form information was inserted successfully." %>
Thanks