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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help in this INSERT Statement in the ASP

Status
Not open for further replies.

AstroPower

Programmer
May 8, 2005
8
EG
Hello all;
Does any one know what is the problem with this SQL insert:

Code:
rsAppData2.Source ="INSERT INTO Data (FName,Serial,email) VALUES ('" & Request.Form("FName") & "','" & Request.Form("Serial") & "','" Request.Form("email") & "')"

It gives error in the ASP page
 
What error would that be? We need a little more :)

The SQL structure looks good, so this could be anything to not having a required field in your statement to serial being a numeric type.


* required as in set to not null with no default value

-T

barcode_1.gif
 
To help debugging you might try this:[tt]
tempSQL ="INSERT INTO Data (FName,Serial,email) VALUES ('" & Request.Form("FName") & "','" & Request.Form("Serial") & "','" Request.Form("email") & "')"

Response.Write "<BR>" & tempSQL & "<BR>"
'Response.End
rsAppData2.Source = tempSQL
[/tt]

You could run that and it shoud spit out the actual text of the SQL and maybe you will see a problem in your submitted form values... if you dont see the SQL string then uncomment the Response.End just until you can see it and then put the comment back in so that the thing will actually run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top