Solved

DBGrid doesn't work

Posted on 2002-05-29
12
368 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

860 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