Solved

DBGrid doesn't work

Posted on 2002-05-29
12
360 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 200 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now