trialer
Well-known member
- Joined
- Oct 4, 2010
- Messages
- 64
- Programming Experience
- 1-3
VB.NET:
Connect()
Dim cmd As New SqlCommand("select max(Reg_No) from table_subsprofile", con)
Dim n As Integer
n = cmd.ExecuteScalar
txtReg_No.Text = n + 1
Disconnect()
Help me to get through this problem. if there is no value in the sql database table_subsprofile an error occured.
Now if there is no data in the reg_no then the first value will start by 1
Thanks.