Hi all
I am using Vb2008 Express and an Access DB.
I would like to Display a note from a column in the Notes_tbl to a text box this from an Access database.
Here is the code that I used but it does not do the job.
Dim mycon As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\DEsign.accdb"
Dim Notes As String = "SELECT * FROM Notes_tbl "
Dim conNotes As New OleDb.OleDbConnection(mycon)
Dim Notescmd As New OleDb.OleDbCommand(Notes, conNotes)
conNotes.Open()
Dim ID As String = CStr(e.RowIndex)
Dim qry As String = "SELECT Dsgntxt FROM Notes_tbl where dsgnid ="
Notescmd.CommandType = CommandType.Text
Notescmd.CommandText = qry & ID
m_Notes = Notescmd.ExecuteReader()
While m_Notes.Read
txtNotes.Text = (m_Notes.GetString(1))
End While