admin interface

  • Thread starter Thread starter Tony WONG
  • Start date Start date
T

Tony WONG

now the program is hard coded.

if logonuser = "john" then button.visible = true

then go to admin interface.

now i've put the users and its authority to a sql table.

how can i check again the table by vb code?

is it wise to do it such way? or better ideas?

Thanks a lot.

tony
 
now the program is hard coded.

if logonuser = "john" then button.visible = true

then go to admin interface.

now i've put the users and its authority to a sql table.

how can i check again the table by vb code?

is it wise to do it such way?  or better ideas?

Thanks a lot.

tony

Hi Tony

Here's an example

Dim conn As New SqlConnection("your connection string to your
database")
Dim sqlComm As New SqlCommand("SELECT userid FROM users WHERE
username='John' AND password='password'", sqlConn)
Dim r As SqlDataReader = sqlComm.ExecuteReader()
If r.Read() Then
button.visible = true
End If
r.Close()

I hope you get the idea
 
Back
Top