private void GetNewId() { int newID = 0; Program.Connection.CommandText = "SELECT MAX(ClientId) AS ClientId FROM DateClientiAmanet"; DataTable Table = new DataTable(); Program.Connection.FillDataTable(Table, true); newID = Convert.ToInt32(Table.Rows[0]["ClientId"]); InformatiiDespreClient(); cboNumeClient.SelectedValue = newID.ToString(); }
INSERT INTO tblBlah1 (Col1,Col2,Col3) VALUES (Val1,Val2,Val3);
SELECT SCOPE_IDENTITY()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)