Hello:

int codigo=int.Parse(this.txtCli_cod.Text);
                if (dr ==DialogResult.Yes){
                        try {
da_cli.DeleteCommand = con.CreateCommand(); da_cli.DeleteCommand.CommandText = "DELETE FROM CLIENTES WHERE
CLI_COD = @cli_cod";
da_cli.DeleteCommand.Parameters.Add("@cli_cod",
codigo).SourceColumn = "CLI_COD";
da_cli.Update(ds_cli, "CLIENTES");
                                        ds_cli.AcceptChanges();
MessageBox.Show("Record deleted...");
                        } catch (Exception ex) {
                                MessageBox.Show(ex.ToString());
                        }
                } else {
                        MessageBox.Show("Record NOT deleted...");
                }

da_cli is my data Adapter and ds_cli is my DataSource, is something
wrong with this?


The database has changes before the update ??



--
Carlos Guzmán Álvarez
Vigo-Spain

http://carlosga.blogspot.com/

"When you don't code, you tend to become one of those architects who thinks 
everything is possible" ( Anders Hejlsberg )



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to