[Mono-list] GetUpdateCommand/ExecuteNonQuery adapter.Update

Wolfgang Mauer W.Mauer at top-soft.info
Tue Dec 9 07:18:45 EST 2008


Hi all,
can someone can tell me what is the "right" way to sync a dataset with the 
database.
I have try'd some diffrent ways with MySql and Npgsql but in all ways Update 
was not possible.
the filling of a dataset was no problem.
i use the ProviderFactory from Mono.Data

Just do a adapter.Update has no effect

with 
CommandBuilder and GetUpdateCommand/ExecuteNonQuery

Provider provider = ProviderFactory.Providers["Mysql.Data"];
DbCommandBuilder builder = 
(DbCommandBuilder)provider.CreateCommandBuilder(this.adapter);
DbCommand updateCommand = builder.GetUpdateCommand(); exception => "Cannot 
cast from source to destination type" ???????

the selectcommand of the adapter is valid an a adapte.fill work right.

any Help

-- 
Top-Soft
Softwareentwicklung
Inhaber: Wolfgang Mauer
Reitesweg 9, 96103 Hallstadt
Tel.: +49 (0)951 / 2221520
Fax: +49 (0)951 / 2221521


More information about the Mono-list mailing list