all groups > sql server programming > april 2004 >
You're in the

sql server programming

group:

SQL Server/ADO/XP problem "query cannot be executed"



SQL Server/ADO/XP problem "query cannot be executed" George Copeland
4/12/2004 10:42:31 PM
sql server programming: This is a request for help fixing a SQL Server 2000/ADO problem on Windows
XP. I would appreciate any useful assistance.

PROBLEM: SQL Server access on my machine fails as follows:

1. All of my VB6 apps reference the following ADO typelib:
Microsoft ActiveX Data Objects 2.7 Library

Located at:
c:\Program Files\Common Files\System\ADO\msado27.tlb

When I open one of these projects in VB6, the reference to msado27.tlb is
shown as MISSING. If I remove the reference then open the references dialog
again, msado27.tlb is listed normally. When I check it and try to close the
references dialog, I take an "Error in loading DLL".

I can remove the reference to msado27.tlb and add a reference to msado15.dll
(Microsoft ActiveX Data Objects 2.8 Library).

When I run the app, I take a trappable error on the first ADO line my app
executes:

Dim lo_Connection As ADODB.Connection

Set lo_Connection = New ADODB.Connection

The error is:
Automation error
The specified procedure could not be found.

2. In Enterprise Manager, when I do "Open Table/Return All Rows" on any
table, I take the following error:
"The query cannot be executed because some files are either missing or not
registered. Run setup again to make sure the required files are
registered."


CURRENT CONFIGURATION
I develop software in VB6 that accesses SQL Server via a dsn-less
connections and disconnected recordsets. I am running SQL Server 2000
Standard locally, version installed from the MSDN install CD and updated by
service pack download.

SQL Server version: version 8.00.760 (SP3)

VB version: VB6 SP5

Component Checker 2.0 shows no problems, and reports:
The following product releases were matched: MDAC 2.8 RTM.

My OS is Windows XP Home. As far as I can tell, it is completely updated
with all hotfixes, including the following:
KB810218
KB820291
KB821253
KB822603
KB823182
KB824105
KB824141
KB826939
KB828035
KB829558
Q322011
Q327979
Q814995
Q815485


ATTEMPTS TO FIX
A. I have uninstalled and reinstalled SQL Server and client tools *numerous*
times with no change.

B. Queries in Query Analyzer execute just fine.

C. The last four lines out of sqlstp.log (located in c:\Windows) are as
follows:

12:40:04 StatsGenerate returned: 2
12:40:04 StatsGenerate (0x0,0x1,0xf000000,0x100,1033,303,0x0,0x1,0,0,0
12:40:04 StatsGenerate -1,George Copeland)
12:40:04 Installation Succeeded

D. The only services running during setup are those specified by Microsoft
KB article 192710. There are no relevant errors in the event log.

E. I tried reinstalling MDAC 2.7 SP1 Refresh and MDAC 2.8. No change.

F. Microsoft KB Article 315868
(http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B315868) says
the following:

If the reinstallation of the SQL Server 2000 Client Tools does not correct
the problem, then re-register the following DLLs by using Regsvr32.exe, and
then restart the computer:
C:\Program files\Common Files\System\ADO\Msado15.dll
C:\Program files\Common Files\System\Ole Db\Oledb32.dll
C:\Program files\Common Files\System\Ole Db\Sqloledb.dll
C:\WINNT\System32\Atl.dll

Attempting to register the first three dlls fails with
"LoadLibrary("C:\Program files\Common Files\System\ADO\Msado15.dll")
failed - The specified procedure could not be found.". In any case, this
does nothing to fix the problem. And since these link libraries are not
registerable, this KB article is just a little, shall I say, unhelpful.


Please note that the MS newsgroups are FULL of requests for help on this
EXACT problem. All attempts to help have failed--NOBODY has figured out the
fix. Most people trying to help are treating it as an installation issue,
because that is what the error message says. However, I suspect instead
that a Windows XP hotfix has CLOBBERED ADO.

BTW, this is a BIG issue for me. My development machine is hosed, and until
I get this fixed, I AM COMPLETELY DOWN.


Re: SQL Server/ADO/XP problem "query cannot be executed" George Copeland
4/13/2004 3:05:17 PM
[quoted text, click to view]

Thanks a million, that fixed the problem!

Some notes about the KB article:

1. My dasetup.log did not show an install failure as the article said it
should.
2. Renaming Odbcconf.dll did not fix the problem.
3. Even though the article warned against it, I downloaded and ran the
Unmgrt.exe tool then reinstalled MDAC 2.8 according to the instructions.
4. After the install, Windows required a reboot. On shutdown, there were
several programs that crashed. Nothing in the event logs.
5. After the reboot, queries in Enterprise Manager and native ADO worked
just fine.

Great job!

Re: SQL Server/ADO/XP problem "query cannot be executed" shachare NO[at]SPAM bgumail.bgu.ac.il
5/11/2004 5:07:18 AM
[quoted text, click to view]


Hi,

In the article is written :
Put the Unmigrt.cmd and Unmigrt.rsp files in a folder on the computer
that has the problem.
What does it mean??
what is the folder on the computer that has the problem??
doe it the Microsoft SQL Server folder??
When I try to run the Unmgrt.exe I get the message can find
mdacxpak.inf file
Do you get this error?

Thanks
Re: SQL Server/ADO/XP problem "query cannot be executed" Erland Sommarskog
5/11/2004 9:53:53 PM
Efrat (shachare@bgumail.bgu.ac.il) writes:
[quoted text, click to view]

It means any folder. For instance C:\TEMP\MDAC.

[quoted text, click to view]

I have not tried running these programs myself, but as I read the KB
article, you should also put mdac_typ.exe into the same folder.
(mdac_typ.exe is the installation file for MDAC.) Did you do this?


--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
Re: SQL Server/ADO/XP problem "query cannot be executed" George Copeland
5/16/2004 8:57:56 PM
[quoted text, click to view]

I don't know any other way to say it than what it says in the instructions.
You unzip the download on the computer that is throwing the ADO errors.

[quoted text, click to view]

Wherever you unzip the download.

[quoted text, click to view]

It is not a SQL Server problem, it is an MDAC problem, an ADO problem, a
data access over the network problem.

[quoted text, click to view]

Unbgrt.exe is a self-executing zip. Run it and take all the defaults.

AddThis Social Bookmark Button