Solved

DBGrid doesn't work

Posted on 2002-05-29
12
369 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Industry Leaders: 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

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

726 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