TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shirley Tan
NA
1
0
problem with retrieving data from MS access database
Oct 31 2007 5:09 AM
I have problem in this. E error keep prompting that i cannot convert string into integer. FYI: I am using Visual Web Developer 2005 Express edition
Here's is my code..
Protected Sub btnRetrieve_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Username As String
Username = CType(txtUsername.Text, String)
Dim DBConnection As Data.OleDb.OleDbConnection = New Data.OleDb.OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("~/App_data/project.mdb"))
DBConnection.Open()
Dim SQLString As String = "Select Password FROM Membership WHERE Username = '" & txtUsername.Text & "'"
Dim DataTableReader As Data.OleDb.OleDbDataReader
Dim DBCommand As Data.OleDb.OleDbCommand = New Data.OleDb.OleDbCommand(SQLString, DBConnection)
DataTableReader = DBCommand.ExecuteReader(SQLString)
If DataTableReader.Read Then
If Not IsDBNull(DataTableReader("Password")) Then
Label1.Text = DataTableReader("Password")
End If
End If
DBConnection.Close()
End Sub
Thanks..
Reply
Answers (
0
)
How to create a button in javascript in asp.net ?
folder save in any machine