Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

odbcCommand Parameters

Status
Not open for further replies.

mrtopher

Programmer
Aug 27, 2003
34
US
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()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top