S
Sergio Florez M.
This code gives me an error that says something like "This row already belongs to another table"
//create new row
DataRow ldrInterna = objCliente.PubRDirecciones.NewRow();
//assign values
ldrInterna["DIR_IdMunicipio"] = 1;
ldrInterna["DIR_IdDepartamento"] = 5;
ldrInterna["DIR_IdPersona"] = objCliente.PubRIdPersona;
//add row
objCliente.PubRDirecciones.Rows.Add(ldrInterna.ItemArray);
So what's wrong?
//create new row
DataRow ldrInterna = objCliente.PubRDirecciones.NewRow();
//assign values
ldrInterna["DIR_IdMunicipio"] = 1;
ldrInterna["DIR_IdDepartamento"] = 5;
ldrInterna["DIR_IdPersona"] = objCliente.PubRIdPersona;
//add row
objCliente.PubRDirecciones.Rows.Add(ldrInterna.ItemArray);
So what's wrong?