Re: [Firebird-net-provider] Re: Helping inserting data on a firebird database using C#.
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=lnkkid0944bid$1720dat1642 ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] Re: Helping inserting data on a firebird database using C#.
Hello: Sorry.. what do mean changes before the update? Check if ds_cli.HasChanges is true if not the dataadapter will have nothing to update, did you have deleted the Row from the datatable right ?? -- 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=lnkkid0944bid$1720dat1642 ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] Re: Helping inserting data on a firebird database using C#.
No, o didnt do that.I think that this is the problem then.I try to read about it, i m completely lost on this stuff.Thanx :)On 4/11/06, Carlos Guzmán Álvarez [EMAIL PROTECTED] wrote: Hello: Sorry.. what do mean changes before the update?Check if ds_cli.HasChanges is true if not the dataadapter will havenothing to update,did you have deleted the Row from the datatable right ?? --Carlos Guzmán ÁlvarezVigo-Spainhttp://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 languagethat 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?cmdlnkkid0944bid$1720dat1642 ___Firebird-net-provider mailing listFirebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] Re: Helping inserting data on a firebird database using C#.
i tried this: DataTable dtTable = ds_cli.Tables[0]; dtTable.PrimaryKey = dtTable.Columns[0]; DataRow delete = dtTable.Rows.Find(txtCli_cod); delete.Delete();But it gives me an error, how am i supposed to pass the PrimaryKey value to the dataTable?Thanx again, and sorry for the lots of questions :(On 4/11/06, Fabio Gomes [EMAIL PROTECTED] wrote: No, o didnt do that.I think that this is the problem then.I try to read about it, i m completely lost on this stuff.Thanx :) On 4/11/06, Carlos Guzmán Álvarez [EMAIL PROTECTED] wrote: Hello: Sorry.. what do mean changes before the update?Check if ds_cli.HasChanges is true if not the dataadapter will havenothing to update,did you have deleted the Row from the datatable right ?? --Carlos Guzmán ÁlvarezVigo-Spainhttp://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 languagethat 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?cmdlnkkid0944bid$1720dat1642 ___Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] Re: Helping inserting data on a firebird database using C#.
Hello: delete.Delete(); For this line try instead: dtTable.Rows.Remove(delete); -- 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=lnkkid0944bid$1720dat1642 ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider