Dim conn As New System.Data.OleDb.OleDbConnection()
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\Database1.accdb"
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim sql As String = "SHOW * From tbl_info Where AdminNo = '" & ListBoxassign.Items & "'"
listboxassign.items.show(AdminNo)
Xiao_1
0
Junior Poster in Training
Recommended Answers
Jump to PostThere is no Show statement. You need to use the Select statement.
Jump to PostThere is no "Show" keyword in SQL Statement to retrieve data from a table.
Your SQL Statement swhould beDim sql As String = "Select * From tbl_info"
Now create a command object and dataReader object to read data from that table.
All 7 Replies
Minimalist
96
Posting Pro
Santanu.Das
125
Santanu Das
Xiao_1
0
Junior Poster in Training
Santanu.Das
125
Santanu Das
Xiao_1
0
Junior Poster in Training
Xiao_1
0
Junior Poster in Training
Santanu.Das
125
Santanu Das
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.