What I have, is a single table containing a user ID. When a user logs in to a site (possible new user), I want to check the table to see if they exist or not... if the record exists, then continue with the login process.
If not, then redirect the user to a sign up page.
I have the database connection established...
Code:
Dim mMyConnectionString AsNew SqlConnection(ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)
Dim SQLCommand AsNew SqlCommand("SELECT USERID FROM([DatabaseName].[dbo].[Store]", mMyConnectionString)
Dim reader As SqlDataReader = SQLCommand.ExecuteReader()
But for some reason, my brain is not functioning this morning... and can't get the syntax right for this...
If reader finds the record, then do the function, Else, redirect to sign-up page.
HELP!
Thanks,
-mb
__________________
Need a vacation.
|