View Single Post
  #1 (permalink)  
Old January 30th, 2004, 05:05 PM
dghughes42 dghughes42 is offline
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to change DB values using ASP


Can somebody please tell me why I'm unable to update
an access database using this code:
    Dim ConnectionString
    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\wedding.mdb"
    Dim Connection
    Set Connection = Server.CreateObject("ADODB.Connection")
    Connection.Open ConnectionString, adOpenDynamic, adLockOptimistic, adCmdText

    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.open "Select * FROM Guests WHERE ID=" & Request("GuestName"), Connection

    If Request.Form("GuestNumber") = 0 Then
        Response.write "<div class='heading'>Don't forget to submit your guest number!</div>"
    Else
        If Request.Form("GuestNumber") = 6 Then
            rs("GuestStatus") = 3
        Else
            rs("GuestNumber") = Request.Form("GuestNumber")
            rs("GuestStatus") = 1
        End If
    End If

    rs.Close
    Set rs = Nothing

    Connection.Close
    Set Connection = Nothing
I'm getting a server error that the server is unable
to do procedure or some nonsense and the DB changes
are not occurring. I'm able to see the DB and populate
selects and such, just no changin' DB values.
I haven't coded in a few years, did something change
that I should know about?
Reply With Quote