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!

insert record syntax

Status
Not open for further replies.

ikim2000

MIS
May 23, 2002
22
CA
I'm trying to execute the connection object string below but it fails in the ASP page that this code resides. I know it fails because no record gets added to the table. I think it has to do with the vID(the data type is integer) syntax...

-----------------------------------------------------------
sqlText = "insert into tblCustomer(ID, CompanyName, FirstName, LastName,) values (vId,'"& vCompany &"','"& vFirstName &"','"& vLastName &"')"
---------------------------------------------------------
What would be the correct syntax?

Thanks,
ik

 
what is vID? a form value or a auto number
first thing is to test the values before trying to insert for actual values
response.write(vId) etc...
also, why is it not within the quotes? leads me to believe it is a auto number and if that is the case you do not need to reference it in the insert for it will be added automaticaly.

else
try CLnt(vID) to convert to integer for assurance. Hope that helps,
Ted
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top