admin interface

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top