Solved

DBGrid doesn't work

Posted on 2002-05-29
12
364 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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 designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 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