473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 11640
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

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

Similar topics

0
by: Randi | last post by:
Hi all, I have this project to use the ADODB control to acces and manipulate the Access DB. I amd the mistake of first doing this project with just the data control. It worked fine with this...
0
by: elcc1958 | last post by:
I need to support a VB6 application that will be receiving disconnected ADODB.Recordset from out DotNet solution. Our dotnet solution deals with System.Data.DataTable. I need to populate a...
0
by: Channing Jones | last post by:
Hello everyone, I am trying to store data in a binary field of an SQL-Server table using ADODB. So far, I have managed to store a record but not any data in the binary field. I only get...
5
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As...
0
by: CFW | last post by:
I thought this was going to be easy but I'm missing something . . . I need to open an ADODB recordset using the recordset source for a list box on my for. When my form opens, the list box ADODB...
0
by: Andre Azevedo | last post by:
Hi all ! I've created a .net serviced component with only one method. This method receive an ADODB.Command object and execute it. The ADODB.Command object is created in the client process. (VB...
0
by: PCroser | last post by:
I have encountered a problem when querying a table. The query passed data into a recordset which should have resulted in many records but has returned EOF. After debugging the code the only...
6
by: Oko | last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access 2002. One of the reports within the DB uses data that is Dynamic and cannot be stored on the SQL Server. To resolve this, I...
2
EYE4U
by: EYE4U | last post by:
Hi all, This is how you can connect to an Access Database using ADODB.. First add a reference to Microsoft ActiveX Data Objects 2.0 Library Now to lets Declare some variables : Private Con...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.