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 )
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 PrimaryKe
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
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, y
Sorry.. what do mean changes before the update?The weird thing is that i dont have any errors, but it doesnt delete either :(On 4/11/06, Carlos Guzmán Álvarez
<[EMAIL PROTECTED]> wrote:
Hello:>> int codigo=int.Parse(this.txtCli_cod.Text);> if (dr ==DialogResult.Yes){>
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 CLIEN
Hi, thats me again :)Now i m trying to delete a record using this: int codigo=int.Parse(this.txtCli_cod.Text); if (dr ==DialogResult.Yes){ try { da_cli.DeleteCommand =
con.CreateCommand();