My table can only have a set number of records (in this case 25), so I am trying to count how many rows there are in a table.
Does this code do that?
Thanks for help
Does this code do that?
VB.NET:
Me.con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Application.StartupPath & "\users.mdb"
dta = New OleDbDataAdapter("Select * from Users", con)
dst = New DataSet
dta.Fill(dst, "Users")
con.Close()
If Me.dst.Tables("Users").Rows.Count >= 25 Then
MessageBox.Show("No room to add")
Else
MessageBox.Show("room to add")
End If
Thanks for help