i've database in access with auto increase area (ID).

i place record such as this (in C#)

SQL = "insert into TermNumTbl (DeviceID,IP) values ('" + DeviceID + "','" + DeviceIP + "') ";
OleDbCommand Cmd = new OleDbCommand(SQL, Conn);

ways to get the final placing number ?

i shouldn't run new query i understand that in sql there's something similar to SELECT @@IDENTITY

however i dont understand how to utilize it

thanks ahead of time

Much more about this : Getting the identity of the most recently added record

The Jet 4. provider supports @@Identity

string query = "Insert Into Categories (CategoryName) Values (?)";
string query2 = "Select @@Identity";
int ID;
string connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Northwind.mdb";
using (OleDbConnection conn = new OleDbConnection(connect))
  using (OleDbCommand cmd = new OleDbCommand(query, conn))

    cmd.Parameters.AddWithValue("", Category.Text);
    cmd.CommandText = query2;
    ID = (int)cmd.ExecuteScalar();