![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
19/08/2008, 08:06
|
| | Fecha de Ingreso: julio-2008
Mensajes: 22
Antigüedad: 16 años, 6 meses Puntos: 0 | |
Respuesta: Valor autonumerico SQL Al final lo he solucionado así:
conexion = new SqlConnection(conString);
conexion.Open();
String con = "SELECT Scope_Identity() as id;";
DataSet ds = new DataSet();
adapter = new SqlDataAdapter(con, conexion);
adapter.Fill(ds);
return int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
Gracias por tu respuesta. Un saludo. |