Command builder question - 03-13-2010 , 07:36 PM
I am using below code to automatically generate commands via command
QuerySt = "SELECT <fiedl list> FROM ..."
CompanyAdapter = New OleDbDataAdapter(QuerySt, LocalConn)
CompanyBuilder = New OleDbCommandBuilder(CompanyAdapter)
Is there a way to take command builder generated INSERT/UPDATE/DELETE
commands, modify them and get data adapter to use the modified command
instead of the command builder generated commands?
Re: Command builder question - 03-23-2010 , 12:34 PM
The OleDbCommandBuilder has GetInsertCommand(), GetUpdateCommand(), and
GetDeleteCommand() which each returns an OleDbCommand object. You can then
modify the command object as needed and explicitly set it to the appropriate
OleDbDataAdapter property (OleDbDataAdapter.InsertCommand,
OleDbDataAdapter.UpdateCommand, or OleDbDataAdapter.DeleteCommand).
-- second paragraph of the Remarks section notes doing this type of
"John" <info (AT) nospam (DOT) infovis.co.uk> wrote
|Thread Tools||Search this Thread|