如下:
sql += "',N'";
sql += desc1;
sql += "',N'";
sql += desc2;
sql += "',N'";
sql += desc3;
sql += "');select @@identity;";
OleDbConnection conn = getOleDbConntion();
OleDbCommand cmd = new OleDbCommand(sql, conn);
conn.Open();
OleDbDataReader reader = cmd.ExecuteReader();
reader.Read();
string index = reader.GetValue(0).ToString();
conn.Close();
return index;
}