powerlock2005
Technical User
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,
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,