i have database in access with auto increase field (ID
).
i insert record like this (in C#)
SQL = \"insert into TermNumTbl (DeviceID,IP) valu
I like more indicate the type of command is very similar to the good solution provided by Pranay Rana
using (OleDbCommand cmd = new OleDbCommand())
{
cmd.CommandType = CommandType.Text;
cmd.CommandText = sql_Insert;
cmd.ExecuteNonQuery();
cmd.CommandText = sql_obtainID;
resultado = (int)comando.ExecuteScalar();
}