I asked a similar question here.
The second block of code worked perfectly before. But now I'm getting the read-only error on it for some reason. I pasted it again below.
Dim oConn As New ADODB.Connection
Dim cmd As New ADODB.Command
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _
"SERVER=server;" & _
"DATABASE=database;" & _
"USER=user;" & _
"PASSWORD=password;" & _
"Option=3"
Set cmd = New ADODB.Command
cmd.ActiveConnection = oConn
cmd.CommandText = strSQL
cmd.Execute
oConn.Close
MsgBox ("Query Successful")
I tried looking through the documentation and didn't see anything too helpful. I also mainly did an insert on the database and it still ran fine so the database isn't read-only.
What's wrong? Is there a way to force a read/write property?