thejeraldo
Well-known member
anybody can help me with this?
i need to get the max ID number and then increment it. ive already done that. but the problem is if the max ID number from the table is 0004 the number i get with my code is only 5, what i need is 0005. my data type is int32.
thanks in advance!
i need to get the max ID number and then increment it. ive already done that. but the problem is if the max ID number from the table is 0004 the number i get with my code is only 5, what i need is 0005. my data type is int32.
thanks in advance!
VB.NET:
daGenID = New OleDb.OleDbDataAdapter("SELECT MAX(empid) from employees", con)
daGenID.Fill(ds, "genid")
intLastID = ds.Tables("genid").Rows(0).Item(0) + 1