0

Hey,
I'm trying to create a website for a friend, which involves a login system, with registering users, and then booking places on weekends away.
I have no knowledge of javascript, but would like to use it for client side updates, I only have a week or 2 left to finish the website.
I have used javascript found online to do my password validation and client side confirmation (when registering)
And I would like to be able to have the user type in their preferred username, with a label next to the input box stating whether its available or not based on a list of users in an Access database,
I presume it would check the list on every key input? As thats how both my password javascript sections work.

Thanks, and ask if you need any more information

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by George.Storm
0

Hey,
I'm trying to create a website for a friend, which involves a login system, with registering users, and then booking places on weekends away.
I have no knowledge of javascript, but would like to use it for client side updates, I only have a week or 2 left to finish the website.
I have used javascript found online to do my password validation and client side confirmation (when registering)
And I would like to be able to have the user type in their preferred username, with a label next to the input box stating whether its available or not based on a list of users in an Access database,
I presume it would check the list on every key input? As thats how both my password javascript sections work.

Thanks, and ask if you need any more information

Sorry for the quick post.
I have tried to do it, however, all of the tutorials etc seem to do it by creating an array of usernames and checking that on each keystroke.
However, I need it to check from the access database, which is where my problem lies as I can't seem to work out how to check the database using SQL :/
In fact having tried again today im not sure its possible to use SQL?
I thought of having an if statement which would say (not real code)

lbl_surname.text = "Username is available"
if TABLE Users ("FamilySurname") = VALUES ("' & txt_surname.text & "') then lbl_surname.text = "Username not available"
Else UPDATE Users("FamilySurname') VALUES ('" & txt_surname.text & "')

Obviously with all the oledb connection stuff, with the SQL being saved as cmdstr, then dtrresults=cmdstr.executescalar?

This is how I update one table using SQL, and would like to use a similar method if possible.
conBookings = New Data.OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source = " & Path)

conBookings.Open()

Dim cmdstr As String = "UPDATE Bookings "
cmdstr &= "SET NumberofAvailableBeds = NumberofAvailableBeds - '" & ddl_people.SelectedValue & "' "
cmdstr &= "WHERE Location = '" & ddl_location.SelectedValue & "';"

cmdSelect = New Data.OleDb.OleDbCommand(cmdstr, conBookings)

dtrResults = cmdSelect.ExecuteScalar

conBookings.Close()

Thanks for any help

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.