If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Updating a MySQL database using .asp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-05, 00:07
jbento jbento is offline
Registered User
 
Join Date: Dec 2003
Location: Colorado
Posts: 12
Updating a MySQL database using .asp

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=gsgevent s;UID=name;PASSWORD=password"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConnString

mySQL = "INSERT INTO tbl_registration (dateEntered,salutation,first_lastName,company,mai lingAddress,city,state,zipCode,telephoneNo,faxNo,e mail,xMeal,hotelYesNo,arrivalDate,departureDate,ro omType,bedSize,sharingRoomYesNo,roomMate,totalInRo om,creditCardType,creditCardNo,cardHoldersName,exp Date)"
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,
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On