Entry: Command Object: Monday, April 05, 2004



A difficult to track bug can occur when use the ADO.NET command object with parameters,
the scenario is like this you have a update statement like this
dim cmdsave as new OleDBCOmmand("update tbl1 set title=@titl where tid=100") cmdsave.parameters.add("@title","Test")
cmdsave.executeNonQuery()

The above query is perfectly correct but it will never update the title of the record of tid=100 with "Test" The problem is misspelling that is underlined in the code. This will neither cause a compile time error nor a runtime error. So be careful.

   0 comments

Leave a Comment:

Name


Homepage (optional)


Comments