コード例 #1
0
 public void selectID(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("select ID from LocationEquips where locationID='" + locationEquips.getLocationID() + "'", connection.getConnection());
     locationEquips.setID((int)command.ExecuteScalar());
     connection.close();
 }
コード例 #2
0
 public void selectLastID(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("select TOP 1 ID from LocationEquips ORDER BY ID DESC", connection.getConnection());
     locationEquips.setID((int)command.ExecuteScalar());
     connection.close();
 }