C sharp - Problema con access

 
Vista:

Problema con access

Publicado por Fernando (1 intervención) el 03/05/2006 12:17:21
Hola a tod@s:
Tengo el siguiente problema:
tengo una tabla con un campo de tipo decimal, cuando intento hacer le update me devuelve el siguiente mensaje
"Infraccion de concurrencia, updatecommand afecto a 0 registros"
la variable que le paso al dataset es un decimal

Conecto con la base de datos mediante "System.Data.OleDb.OleDbConnection"

Este es el codigo

decimal superficie_catastral

this.DTFINCA.Rows[0]["SUPERFICIE_CATASTRAL"] = superficie_catastral;

string strSql = "SELECT * FROM FINCA";
OleDbDataAdapter Adaptador = new OleDbDataAdapter();
Adaptador.SelectCommand = new OleDbCommand(strSql, this.ClsEntorno.AccesoBd);
OleDbCommandBuilder cb = new OleDbCommandBuilder(Adaptador);

try
{
Adaptador.Update(this.DTFINCA);
return true;
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
return false;
}

Estoy dandole vueltas y no tengo ni idea por que me viene ese error a ver si alguien puede echarme una mano

Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Problema con access

Publicado por ubu (1 intervención) el 03/05/2006 15:43:33
prueba con un replace "," por "."

this.DTFINCA.Rows[0]["SUPERFICIE_CATASTRAL"] = superficie_catastral.ToString().Replace(',','.') ;
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar