Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DBGrid doesn't work

Posted on 2002-05-29
12
Medium Priority
?
380 Views
Last Modified: 2011-09-20
Why is that DBGrid do not work with ADO data control. I have DBGrid with SP3 and VB6 with SP4 and Access 2000. I need help urgently. Please help!! anybody!!
(I get the message no compatible data source found.)

ADODC connection i use as follows:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NewPos\NewPos.mdb;Persist Security Info=False
0
Comment
Question by:ahmed021399
  • 5
  • 3
  • 2
  • +1
12 Comments
 

Author Comment

by:ahmed021399
ID: 7041174
For any more clarifications please ask.
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 800 total points
ID: 7041184
Simply because the DBGrid control was not designed to be compatible with the ADODB.Recordset object. If you have to use ADO rather than DAO then I would suggest that you use the DataGrid control which is very similar to the DBGrid control but does support the ADODB.Recordset (and hence the ADO Data Control - ADODC).

Essentially your options are:

1) Use DAO not ADO
2) Use another Grid such as the DataGrid.

You will NOT get any answer that will enable you to use the DBGrid with any form of ADO recordset.
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7041661
>>You will NOT get any answer that will enable you to use the DBGrid with any form of ADO recordset.

Tim is right

I would suggest stick to ADO, but opt for another grid
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 43

Expert Comment

by:TimCottee
ID: 7041688
Indeed that would be my preference but for some reason ahmed may prefer DAO and the DBGrid instead.
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7041722
Was just thinking about .NET and the future
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7041731
I agree entirely, I abandoned DAO pretty much as soon as ADO 2.0 came out and haven't touched it since except to deal with problems here and on similar forums. ADO.NET may not be identical to ADO but it is certainly more similar than DAO so would be a logical step. However there is no accounting for personal taste.
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 7041801
you can use the dbgrid with ADO or with any kind of data for that matter
just use it in unbound mode
as for DAO versus ADO
i love ADO wonderfully flexible
but i never use it against an access db
againts an access db DAO is magnitudes faster then ADO
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 7041820
btw it is not an either/or situation you can use both ADO and DAO in the same project
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 7041833
oops forgot to look at your grading record
PLEASE do NOT accept my comments as an answer
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7041850
Oh not a good grading record indeed ahmed!
0
 

Author Comment

by:ahmed021399
ID: 7044249
Hope this would make me a good grader.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7044255
Well it is indeed a start ahmed.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

963 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