Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dim adap As New OdbcDataAdapter("Select * from ProductsList", dbconn)
      Dim dset As New DataSet
      dset.Clear()
      adap.Fill(dset)
      DataGridView1.DataSource = dset.Tables(0).DefaultView


What I have tried:

adap.Fill(dset)

here's the error in the code
Posted
Updated 20-Nov-21 20:30pm
v2
Comments
Wendelius 21-Nov-21 0:36am    
What is the error message you get?

1 solution

Without the error message, we can't help you specifically.
But the most usual are bad connection information, or the wrong table name.

Look at the error message: they are normally pretty explicit, and tell you what the problem is. Chances are it's something simple like "ProductList" rather than "ProductsList" - but we have no access to your DB, so we can't tell!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900