Re: I must be tarded.. please help
Posted by: David
Date: February 17, 2005 02:51PM

Something like:

Dim myUpdateCommand as New MySqlCommand()
Dim sqlUpdate as String

sqlUpdate = "UPDATE company SET .... "
myUpdateCommand.Connection = conn
myUpdateCommand.CommandText = sqlUpdate

myAdapter.UpdateCommand = myUpdateCommand

Then, after you modify your DataSet, when you call the .Update method, the DataAdapter will use this command object to process the update.
Use similar code for your Insert and Delete command objects, if necessary.

The DataAdapter merely processes the different command objects. You need to build the objects for it to process.

Alternatively, you can look into using the CommandBuilder. I've never used it, but it's supposed to automatically build the Insert, Update and Delete command objects based on the SelectCommand you've defined.

Options: ReplyQuote


Subject
Written By
Posted
February 17, 2005 09:21AM
February 17, 2005 11:38AM
Re: I must be tarded.. please help
February 17, 2005 02:51PM
February 18, 2005 10:37AM
February 18, 2005 11:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.