§tudz
Dec 2nd, 2003, 05:03 AM
Hi,
I am writing a website, and I am using MS Access DBs
DB Name:
puzzlepirates.mdb
tables:
tbl_Users
fields:
Username
Password
******************************************
I want to retreive the value of the password, the SQL would be
"SELECT Password FROM tbl_Users WHERE USERNAME = " txt_Username.text
This would be a string value I know, but how do I execute it? and check it against txt_Password.txt?
I can retreive data from another table in the DB and add it to a datagrid with the following code, but I have no idea how to get just the password?
Dim MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & _
server.mappath("puzzlepirates.mdb"))
Dim CommandText As String = "Select Name, Title, Rank from alchemist_guild"
Dim myCommand As New OleDBCommand(CommandText, myConnection)
myConnection.Open()
DGAlchemist.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
DGAlchemist.DataBind()
any help?
Thanks
I am writing a website, and I am using MS Access DBs
DB Name:
puzzlepirates.mdb
tables:
tbl_Users
fields:
Username
Password
******************************************
I want to retreive the value of the password, the SQL would be
"SELECT Password FROM tbl_Users WHERE USERNAME = " txt_Username.text
This would be a string value I know, but how do I execute it? and check it against txt_Password.txt?
I can retreive data from another table in the DB and add it to a datagrid with the following code, but I have no idea how to get just the password?
Dim MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & _
server.mappath("puzzlepirates.mdb"))
Dim CommandText As String = "Select Name, Title, Rank from alchemist_guild"
Dim myCommand As New OleDBCommand(CommandText, myConnection)
myConnection.Open()
DGAlchemist.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
DGAlchemist.DataBind()
any help?
Thanks