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

Updating MySQL Database using .asp

Status
Not open for further replies.

powerlock2005

Technical User
Feb 23, 2005
42
0
0
US
All,
I would like to update my MySQL database from a field called: regID, which is an auto_increment field, using a .asp page.

This is the code I have that connects and adds to the database:

<%

ConnString = "Driver={MySQL};SERVER=localhost;DATABASE=gsgevents;UID=name;PASSWORD=password"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConnString

mySQL = "INSERT INTO tbl_registration (dateEntered,salutation,first_lastName,company,mailingAddress,city,state,zipCode,telephoneNo,faxNo,email,xMeal,hotelYesNo,arrivalDate,departureDate,roomType,bedSize,sharingRoomYesNo,roomMate,totalInRoom,creditCardType,creditCardNo,cardHoldersName,expDate)"
mySQL = mySQL & " VALUES ('" & request.form("dateEntered") & "','" & request.form("salutation") & "','" & request.form("first_lastName") & "','" & request.form("company") & "','" & request.form("mailingAddress") & "','" & request.form("city") & "','" & request.form("state") & "','" & request.form("zipCode") & "','" & request.form("telephoneNo") & "','" & request.form("faxNo") & "','" & request.form("email") & "','" & request.form("xMeal") & "','" & request.form("hotelYesNo") & "','" & request.form("arrivalDate") & "','" & request.form("departureDate") & "','" & request.form("roomType") & "','" & request.form("bedSize") & "','" & request.form("sharingRoomYesNo") & "','" & request.form("roomMate") & "','" & request.form("totalInRoom") & "','" & request.form("creditCardType") & "','" & request.form("creditCardNo") & "','" & request.form("cardHoldersName") & "','" & request.form("expDate") & "')"
'make sure to change the word "demoConn"
'below to the name of your connection
Conn.execute(mySQL)

How can I implement a way to update the table with .asp using the regID field?

Please help someone.

Thanks in advance,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top