I have this code in my program if i click the generate button
The Studnum should have a Year(now) and an Incremented value(E.G 2009-001) where 001 is the increment Next value should be 2009-002 when there is 2009-001 in my database Oledb btw its a maskedtextbox i'm stuck help
what line of code should i add next and i need only to click the generate button once thanks for replies
VB.NET:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\proj\Module_1_Encoder\enrollment.mdb"
con.Open()
sql = "Select Max(Studnum) from tblStudent"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "tblStudent")
con.Close()
what line of code should i add next and i need only to click the generate button once thanks for replies