Dim MaxItemID As Integer Dim objCMD As New MySqlCommand(StrSql, objConn) MaxItemID = IIf(IsDBNull(objCMD.ExecuteScalar()), 0, objCMD.ExecuteScalar()) + 1
int MaxItemID = 0; SqlCommand objCMD = new SqlCommand(StrSql, objConn); MaxItemID = (int)(objCMD.ExecuteScalar())+1;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)