Solved

ADO and DBGrid

Posted on 2000-02-17
4
1,139 Views
Last Modified: 2013-11-23
I have used dbGrid using RDO but I want to use ADO and SQL TO populate a dbGrid?
0
Comment
Question by:damienm
4 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2531612
What is your question?
0
 
LVL 1

Expert Comment

by:ca_heckler
ID: 2531963
If you want to use ADO, make sure you use the ADO DataGrid (MSDATGRD.OCX) and ADO Adodc (MSADODC.OCX). They work fine.
0
 

Expert Comment

by:jasonboetcher
ID: 2532045
Using the ADO DataGrid with the ADO DataControl is very simple.  

Set the Datasource property of the ADO Datagrid to whatever you named your ADO DataControl.  Then use your SQL statement as the Recordsource property of your ADO DataControl.  Refresh the ADO DataControl and that's it.

dgdData.DataSource = adoData
strSQL = "SELECT * FROM [Accounts]"
strOrder = " ORDER BY [Account Num]"
adoData.RecordSource = strSQL & strOrder
adoData.Refresh
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 2532359
DBGrid doesn't accept ADO recordset. The only way you can use DBGrid with ADO will be to manually populate the grid control.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Zip Folders Using Chilkat Routines 1 73
RESTRequest Parameter 4 53
Send outlook email from VBS Script 2 58
Remove Exif Orientation before adding image to db 9 40
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question