best way of using INESRT statement ??

D

David

Hi,

I have a form which submits fields to add a new record to my table.

I have the following code:

__________________________________

vUser = request.form("user") 'PK in table (not autonumber)
vPass = request.form("pass")
vEmail = request.form("email")

uSQL = "INSERT into OrderStatusAccess (UserID, Password, Email,
CustomerID) values ('" & vUser & "', '" & vPass & "', '" & vEmail &
"', '" & session("customer") & "');"

adoDataConn.Execute (uSQL)

______________________________________

The problem:

This code just inserts a blank record at the top of my table, so that
when I go to view all the records listed for that table, nothing
shows, because the first record is blank.

UserID is the PK for the table OrderStatusAccess.

Any ideas ?

David
 
D

Dave Anderson

David said:
uSQL = "INSERT into OrderStatusAccess (UserID, Password,
Email, CustomerID) values ('" & vUser & "', '" & vPass &
"', '" & vEmail & "', '" & session("customer") & "');"

The problem:

This code just inserts a blank record at the top of my
table, so that when I go to view all the records listed
for that table, nothing shows, because the first record
is blank.

What results from this?

Response.Write(uSQL)


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

David Gordon

Thanks Dave,

I fixed my code by reading what was printed....my fault.


David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top