tommy

tommy

  • NA
  • 32
  • 0

Increment of number after grabbing it from DB

Feb 3 2009 9:27 PM
The situation is I have connected to my Oracle database and grabbed an INT number i wanted and display into my form textbox.No prob thus far...But i want it to +1 or increment and at lost of how to do so.

localSQL = "SELECT MAX(ITEM_ID) FROM SYS_ITEM";  
                    OracleCommand cmdOracle = new OracleCommand(localSQL, localConnection);  
                    cmdOracle.CommandType = CommandType.Text;  
                    OracleDataReader drOracle = cmdOracle.ExecuteReader();  
                        if (drOracle.Read())  
                        {addlocaidBox.Text = drOracle.GetOracleValue(0).ToString();} 

The code look like this.I'd welcome any suggestions or advice.

Answers (8)