thomas008
Well-known member
Hi
I'm trying to use stored procedures as select,update,delete and insertcommand for the tableadapter. Is it posible to do this. I tried the following
The commands seem to work only not the way they should!
When i Insert a record gets deleted and when i update a record gets inserted.
I can not figure out why because the commandnames are matching the SQL i want to place in them.
Does anyone have an idea?
I'm trying to use stored procedures as select,update,delete and insertcommand for the tableadapter. Is it posible to do this. I tried the following
VB.NET:
myCommand.CommandText = updatecommand
myCommand.CommandType = CommandType.StoredProcedure
myAdapter.UpdateCommand = myCommand
myCommand.CommandText = deletecommand
myCommand.CommandType = CommandType.StoredProcedure
myAdapter.DeleteCommand = myCommand
myCommand.CommandText = insertcommand
myCommand.CommandType = CommandType.StoredProcedure
myAdapter.InsertCommand = myCommand
The commands seem to work only not the way they should!
When i Insert a record gets deleted and when i update a record gets inserted.
I can not figure out why because the commandnames are matching the SQL i want to place in them.
Does anyone have an idea?