469,270 Members | 1,037 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

ADODB.Recordset to DataGridView

krungkrung
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
5 11426
Frinavale
9,735 Expert Mod 8TB
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
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
7,872 Expert 4TB
"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
9,735 Expert Mod 8TB
"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
many tnx guys! (",) ---------------------
Nov 13 '08 #6

Post your reply

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

Similar topics

reply views Thread by Channing Jones | last post: by
reply views Thread by Andre Azevedo | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.