Hai,
I manage to do/use this code with Access Database but ended up with this error when I use MySQL Database.
- Code: Select all
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/my-pm-inbox.asp, line 24
This is my code to delete by checkbox:
- Code: Select all
Dim connectionString, pm, conn, rsCount
connectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=monieweb; OPTION=4; UID=root; PASSWORD=monie;"
Set conn = Server.CreateObject("ADODB.Connection")
Set pm = Server.CreateObject("ADODB.Recordset")
conn.Open(connectionString)
Dim comment
For Each comment In Request("delete")
pm.Open "DELETE * FROM userpm WHERE pmNo = "& comment &"", conn,3,3
Next
pm.Open "SELECT * FROM userpm WHERE username = '"& user &"' ORDER BY pmNo DESC", conn
- Code: Select all
<input type="checkbox" name="delete" title="Select" value="<%=pm("pmNo")%>">
This method of deleting using check box works marvelously if I use Access Database. How to twist this code for MySQL Database? Any idea?