[Mono-list] Fw: Re: GetUpdateCommand/ExecuteNonQuery adapter.Update

Daniel Morgan monodanmorg at yahoo.com
Tue Dec 9 09:37:54 EST 2008




--- On Tue, 12/9/08, Daniel Morgan <monodanmorg at yahoo.com> wrote:

> From: Daniel Morgan <monodanmorg at yahoo.com>
> Subject: Re: [Mono-list]  GetUpdateCommand/ExecuteNonQuery adapter.Update
> To: "Wolfgang Mauer" <W.Mauer at top-soft.info>
> Date: Tuesday, December 9, 2008, 9:35 AM
> If you are using gmcs and the .net 2.0 profile or higher,
> you should be using the built-in provider factories in
> System.Data.  
> 
> You would only use the provider factory stuff from
> Mono.Data if you are using mcs and the .net  1.1 profile. 
> Mono.Data.ProviderFactory is deprecated and should only be
> used with .net 1.1 software.
> 
> DbcommandBuilder does not exist in the .net 1.1 profile. 
> DbCommandBuilder is a data type found in the .net 2.0
> profile; therefore, you should be using the gmcs to compile
> and DbProviderFactory found in System.Data.  
> 
> http://msdn.microsoft.com/en-us/library/dd0w4a2z.aspx
> 
> 
> 
> 
> --- On Tue, 12/9/08, Wolfgang Mauer
> <W.Mauer at top-soft.info> wrote:
> 
> > From: Wolfgang Mauer <W.Mauer at top-soft.info>
> > Subject: [Mono-list]  GetUpdateCommand/ExecuteNonQuery
> adapter.Update
> > To: mono-list at lists.ximian.com
> > Date: Tuesday, December 9, 2008, 7:18 AM
> > 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
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list


      


More information about the Mono-list mailing list