Re: SampProv sample and OpenRowset

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



It's at least registered partly. Created the a.udl, SampProv is in the list
(as Microsoft OLE DB Sample Provider). It's hitting my DLL, because I put a
::MessageBox(... MB_OK) in the DLL_PROCESS_ATTACH of DllMain. The property
page is there for the provider - allows me to put in a directory, and it's
persisted because it's there when I come back next time. So that much of
the DLL is working correctly.

Since the last post, I've also been able to successfully trace in
VisusalStudio (after I put in the MessageBox, now I can attach to the
DllHost process and all my breakpoints fire, etc.) So when I run the line
from Query Analyzer
select * from openrowset('SampProv', 'Data Source=d:\temp',
'customer.csv')
I see the message box, I attach to the dllhost process, and I can see
various calls being made - DllMain attach process, attach thread, query for
DBSource interface (and constructor running OK), and a call to
GetProperties. But it doesn't hit any breakpoints that I have on
SetProperties, even though the error message in QueryAnalyzer suggests that
it is IDBProperties::SetProperties that is returning an error. It makes me
wonder if it isn't really even getting to the SetProperties call, but just
getting some COM error before it gets there (yes, this sounds fuzzy, just
brainstorming) or if the error message is misleading.

Finally, any ideas on what the correct format for the second argument in the
call SHOULD be - does the 'Data Source=d:\temp' look correct (even though,
as noted, I don't even see it getting to SetProperties....)

Just to keep everything in one place, the error message in Query Analyzer is

Server: Msg 7373, Level 16, State 2, Line 1
Could not set the initialization properties for the OLE DB provider
'SampProv'.
OLE DB error trace [OLE/DB Provider 'SampProv' IDBProperties::SetProperties
returned 0x80040e21].

"Kevin Yu [MSFT]" <v-kevy@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:Blqpco7UGHA.880@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Tom,

Based on the error message, I think the SampProv provider was not
registered properly. You can try to create a .udl file to see if you can
connect to any data source using the SampProv. Here are the steps:

1. Create a .txt on the desktop and rename it to a.udl
2. Double click the icon and the Data Link Properties dialog will be
shown.
3. Check if the SampProv is in the provider list.

Also, if you're running this in the Query Analyzer, please also check in
the registry to see if you can find SamProv is under that key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\90\Tools\Shell\DataProviders\

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."



.



Relevant Pages

  • RE: 0x7c911e58 error
    ... was still using the registry during log off. ... A provider, OffProv10, has been registered in the WMI namespace, ... Your computer was not assigned an address from the network (by the DHCP ... later for this step to copy the error message on it. ...
    (microsoft.public.windowsxp.general)
  • Re: Cant access wins.mdb w ADO
    ... I get a "unable to locate provider" error message. ... By looking in the registry I confirmed that the "Mircosoft.Jet.OLEDB.3.51" provider isn't installed on the server, ...
    (microsoft.public.data.ado)
  • Re: Can Outlook Express be uninstalled?
    ... "PA Bear" wrote: ... Can you tell us the error message that you are getting. ... with your email account?Make sure that any Anti Virus email scanning is ... My provider, Cox cable, is ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • RE: Volume Shadow Copy service starts and stops every few minutes
    ... According to the MPS Report, the following errors seem to be the root cause: ... Check the Path in the Registry Key ... it seems that you have a 3rd party VSS provider installed ... Which uses these filter drivers: ...
    (microsoft.public.windows.server.sbs)
  • RE: Event Viewer after SP3
    ... I will remove this key from the Registry ... A provider, Rsop Planning Mode Provider, has been registered in the WMI ... provider will be run using the LocalSystem account. ... provider may cause a security violation if it does not correctly impersonate ...
    (microsoft.public.windowsxp.general)