Prueba esto:
Código C:
Ver originalOleDbConnection BaseDatos = new OleDbConnection();
OleDbCommand Com = new OleDbCommand();
string Sql, mascota, miLetra, Sql2, id2;
int x, cont,numeroDevuelto;
BaseDatos.ConnectionString = @"PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\doggy_park.mdb";
BaseDatos.Open();
Com.Connection = BaseDatos;
Com.CommandType = CommandType.Text;
Com.CommandText = "SELECT MAX(Id) as var FROM Cliente ";
OleDbDataReader lector = Com.ExecuteReader();
if (lector.HasRows)
{//si lee que hay registros de esa consulta
if (lector.Read())
{//lee el contenido del reader
numeroDevuelto = lector.GetInt32(0);
numeroDevuelto++;
}
else
{//si no pudo leer
numeroDevuelto = 0;
}
}
else
{//no trae ningun registro
numeroDevuelto = 0;
}
BaseDatos.Close();
id2 = miLetra + numeroDevuelto + checkBox1.Tag;
El código lo hice manualmente en un txt así que puede que tenga errores.