Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help from Access or ADO or VB6 guru - Weird problem

18 views
Skip to first unread message

jcandamo

unread,
Jul 8, 2009, 6:09:38 PM7/8/09
to
I have a weird problem involving vb6 and MS Access. I'll explain in
detail the problem to see if any Access guru can shed some light into
this issue. Just in case if it helps, It started happening when we
installed a new software in the computer. I have been doing some
research online, and found that most likely is a driver, perhaps
something from MDAC that got changed

I have a simple VB6 form with:

References:
-Visual Basic for Applications
-Visual Basic runtime objects and procedures
-Visual Basic objects and procedures
-Microsoft ActiveX Data Objects 2.5 Library

and Components:
-Microsoft ADO Data Control 6.0 (OLEDB)

There is only 1 ado and 1 label in the VB6 form with this code

ado.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=mydb.mdb;Jet OLEDB:Database Password=xxx;"
lblConn.Caption = "Connection Valid"
ado.RecordSource = "SELECT * FROM Employee ORDER BY LName,FName"
'ado.RecordSource = "SELECT * FROM Employee"
ado.Refresh

The connection initializes properly, BUT the ado gives an error:
-unknown
AND
-Run-time error '-2147217900(80040e14)': Automation error

now, this works great in a different machine, but not in the one that
the new software was installed. The problem is that we are not sure
when the software was installed (or uninstalled), or what software
was, and since other software needed is newly there, we would like to
avoid usng Windows restore

to add weirdness, if you use
ado.RecordSource = "SELECT * FROM Employee"
instead of
ado.RecordSource = "SELECT * FROM Employee ORDER BY LName,FName"
It works!!!

There is a LName and FName field in the table. I also tried removing
the ORDER BY, and trying with a few WHERE ... statements and it also
gives the same error, the only time it works is when only the "SELECT
* FROM Employee" is used

I have been reaserching this issue for a few days and no luck so far.
Any tip, idea, comment, or suggestion would be GREATLY appreciated

Many thanks in advance

jcandamo

unread,
Jul 9, 2009, 4:00:55 PM7/9/09
to

I found the solution, has to with a missing MS Access driver. For
future reference see
http://support.microsoft.com/?id=317708
Hope this helps people with similar issues in the future

0 new messages