Delete row from database using oledbcommand
Posted on 2006-04-29
here is my code, i just want to delete a row in the database based on an SQL statement
Dim cn As OleDbConnection
'connection string (path of database)
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & dataSource
'creating a new connection object with connection string
cn = New OleDbConnection(strConn)
'opening the connection
strSQL = "DELETE * " & _
"FROM PlayList " & _
"WHERE userID = " & userID & " AND playListTitle = " & playListName & " "
cmd = New OleDbCommand(strSQL, cn)
cmd.ExecuteNonQuery() '*****ERROR***** no value given for one or more required parameters
I have no idea what the error above means but need this working today!