By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

ADODB.Recordset to DataGridView

krungkrung
P: 18
Hi, can someone help me solve this 'simple' problem of mine???

I tried populating DatagridView using Recordset but it displayed nothing.
I used DatagridView.DataSource = RecordsetObj. RecordsetObj already has records on it, but why records don't display in DataGrid???
I used DataSet to populate Datagrid using the same code (DatagridView.DataSource = DSObj.Tables(index)) and it displayed the records...

Why is it that if I used recordset, it never display anything. Though no errors occurred during execution. Can somebody give me an idea how can I display record in DatagridView using recordset instead of dataset??? Tnx
Nov 12 '08 #1
Share this Question
Share on Google+
5 Replies


Frinavale
Expert Mod 5K+
P: 9,731
The DataGridView will display objects based on the Properties.
At a guess, I would think that the RecordsetObj does not have properties that the DataGridView can automatically use.

What is wrong with using the table?
It works, and it's easier to understand.

-Frinny
Nov 12 '08 #2

krungkrung
P: 18
Hi Frinny!! Tnx for the post...yeah! using table (dataset) is easy indeed.. I just want to explore and exploit the capability of VB.Net when it comes to migrating from VB6 codes..so I will not have a very hard time recoding my old VB6 codes to VB.Net...besides that, I want to make a reusable procedures in Vb.Net that can use both ADO.NET and ADODB...sounds crazy huh?? why should I use ADODB when ADO.NET is now available and indeed much better to use?? well, it is because I still have some solutions that need to use ADODB and...well, its a very complicated and boring explanation, though..whew!! anyway tnx alot!! Btw, I am new to VB.Net. I hope guys like you will never get tired of helping others who are having a hard time making their projects on time...lol (",)
Nov 12 '08 #3

Plater
Expert 5K+
P: 7,872
"exploit" is the key word here.
You are not doing yourself any favors by attempting to downgrade .NET to the levels of vb6 by mixing and matching object types like that.
Nov 12 '08 #4

Frinavale
Expert Mod 5K+
P: 9,731
"exploit" is the key word here.
You are not doing yourself any favors by attempting to downgrade .NET to the levels of vb6 by mixing and matching object types like that.
I imagine the OP will come to that same conclusion once they've played a little more with .NET (I have to learn the hard way too sometimes)

-Frinny
Nov 12 '08 #5

krungkrung
P: 18
many tnx guys! (",) ---------------------
Nov 13 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.