Jessee
asked on
VB6 MySQL Delete statement not working
Hey,
For some reason this code isnt working. Can you see any problems with it?
IP has been dotted out for obvious reasons :)
Thanks!
For some reason this code isnt working. Can you see any problems with it?
IP has been dotted out for obvious reasons :)
Thanks!
Set SQLCn = New ADODB.Connection
Set Cmd2 = New ADODB.Command
SQLCn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & "SERVER=*.*.*.*;" & " DATABASE=jessee10;" & "UID=jessee10_User;PWD=Password;"
SQLCn.Open
With Cmd2
.ActiveConnection = SQLCn
.CommandType = adCmdText
.CommandText = "DELETE * FROM tblSongs WHERE colSongTitle = ? AND colBackupName = ? AND colUserIndex = ?"
.Prepared = True
.Parameters.Append .CreateParameter(, adVarChar, adParamInput, 100, SongName)
.Parameters.Append .CreateParameter(, adVarChar, adParamInput, 100, BackupName)
.Parameters.Append .CreateParameter(, adVarChar, adParamInput, 10, UserIndex)
.Execute
End With
MesI "Record has been deleted."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ty
ASKER
[MySQL][ODBC 3.51 Driver][mysqld-5.0.91-comm