Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys I badly need your help.
I have an examination tomorrow and I have not been a good student. I just can't populate the gridview with the innerjoin query. Here is my code. I am using a mySQL database.


VB
Sub loadingaccess4()
       Dim adapter As New OdbcDataAdapter("Select customer.CustomerName, customer.CustomerID from customer INNER JOIN transaction on customer.CustomerID=transaction.CustomerID", dbconn)
       Dim dataset As New DataSet

       dataset.Clear()
       adapter.Fill(dataset, "")
       Me.GridView3.DataSource = dataset.Tables(0).DefaultView
       Me.GridView3.DataBind()
   End Sub


Thanks guys.
Posted
Comments
Thanks7872 11-Sep-14 10:03am    
And we are not suppose to clear the exam. You should be serious enough to search on yourself. Use your favorite search engine and try to search for "Bind Gridview vb.net"
Kishore Pogaru 11-Sep-14 11:37am    
Why do you want to join the transaction table as you are not fetching anyfield from that
/\jmot 11-Sep-14 12:22pm    
see the given Error carefully, try to findout the error using the debugging mode.
and then post the error with full description with this question here or search it on google.
hopefully you can find the solution easily.
j snooze 11-Sep-14 17:40pm    
I believe in this case failure would be the best thing for you. If you don't like programming find something else you like to do.
Sinisa Hajnal 16-Sep-14 2:23am    
You don't have to call dataset.Clear, you just created it, it is clear. When you post a question, you should describe the problem you have in more detail (in particular, give the error text exactly if you get one). Good luck with your exam.

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