I wrote an application initally using MS SQL but have recently changed over to MySQL. I am going through my application and changing ADO.NET connections to ODBC connections. Most of my simple queries are working fine (SELECT, etc.) but commands that I add parameters too fail. Is there a different way to work with parameters in ODBC than with ADO.NET commands? My code is below, does anyone see the problem?
Code:
objCmd = new odbcCommand("DELETE FROM bTrack_area where areaID = @areaID", objConn)
objCmd.parameters.add("@areaID", lstArea.SelectedValue)
objConn.open()
objCmd.ExecuteNonQuery()
objConn.close()
Code:
objCmd = new odbcCommand("DELETE FROM bTrack_area where areaID = @areaID", objConn)
objCmd.parameters.add("@areaID", lstArea.SelectedValue)
objConn.open()
objCmd.ExecuteNonQuery()
objConn.close()