473,554 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

registering an Ole Db provider

I have written an Ole Db provider. It seems to be registered in the
Operating system to a degree, but not fully, i.e. I can access it from a
client that I have written. But it does not appear in Database Explorer's
list of viable Ole Db drivers...

Any suggestions??
Nov 16 '05 #1
6 14106
Duncan,

When you register your provider, make sure that you have an entry in
the registry under the CLSID with Key Name of OLE DB PROVIDER. The
Database Explorer and other tools scan HKEY_CLASSES_RO OT\CLSID looking
for all entries that have a key with the above name. For examples, have
a look in the registry at the CLSIDs for MSDAORA and SqlServer.

regards
roy fine

"Duncan Winn" <te**@test1.co. uk> wrote in message
news:ur******** ******@TK2MSFTN GP09.phx.gbl...
I have written an Ole Db provider. It seems to be registered in the
Operating system to a degree, but not fully, i.e. I can access it from a client that I have written. But it does not appear in Database Explorer's list of viable Ole Db drivers...

Any suggestions??

Nov 16 '05 #2
Thanks Roy,
make sure that you have an entry in the registry under the
CLSID with Key Name of OLE DB PROVIDER
Are you talking about the rgs file????
Do you know if Excel (2000) can talk to Ole Db providers ?

Thanks,

Duncan.
"rlfine" <rl****@nomail. org> wrote in message
news:#G******** ******@TK2MSFTN GP10.phx.gbl... Duncan,

When you register your provider, make sure that you have an entry in
the registry under the CLSID with Key Name of OLE DB PROVIDER. The
Database Explorer and other tools scan HKEY_CLASSES_RO OT\CLSID looking
for all entries that have a key with the above name. For examples, have
a look in the registry at the CLSIDs for MSDAORA and SqlServer.

regards
roy fine

"Duncan Winn" <te**@test1.co. uk> wrote in message
news:ur******** ******@TK2MSFTN GP09.phx.gbl...
I have written an Ole Db provider. It seems to be registered in the
Operating system to a degree, but not fully, i.e. I can access it from

a
client that I have written. But it does not appear in Database

Explorer's
list of viable Ole Db drivers...

Any suggestions??


Nov 16 '05 #3

"Duncan Winn" <te**@test1.co. uk> wrote in message
news:#i******** ******@TK2MSFTN GP12.phx.gbl...
Thanks Roy,
make sure that you have an entry in the registry under the
CLSID with Key Name of OLE DB PROVIDER

Not specifically -- sounds as if you have used the ATL Provider
templates to develop your OLEDB Provider - I have looked at the ATL
approach a couple of times, but for the OLEDB provider that I developed,
I did not use the templates, rather did it in straight COM. If you can
edit the resource that creates the rgs file, then that would be the
place to do it. But first, I would have a look in the registry and see
if the OLE DB PROVIDER key is present, and that it has a value that
describes your provider. If that key is not present, I would be a
trivial matter to add the key by hand and test to see if that resolved
the problem. If the problem is fixed with the adding of the key, then
we go back a couple of steps and try to find the best place to implement
the fix...
Are you talking about the rgs file????
Do you know if Excel (2000) can talk to Ole Db providers ?

Yes it can. Try this:
---------------------------------------
1. Create a UDL file somewhere - I like the desktop for quick and easy
tests.
2. Open the UDL, and select a Provider and the DataSource - I like Jet
4.0 for testing purposes.
3. Test the connection just to make sure it works.
4. Close the UDL
5. Start MSFT Excel - in File|Open, select "All Data Sources (*.udl
....)" for the file type and navigate to the desktop, and select the UDL
created in step 1.
6. Select the Open button, and then select a table from the list
displayed.
I hope this helps...

regards
roy fine
Thanks,

Duncan.
"rlfine" <rl****@nomail. org> wrote in message
news:#G******** ******@TK2MSFTN GP10.phx.gbl...
Duncan,

When you register your provider, make sure that you have an entry in the registry under the CLSID with Key Name of OLE DB PROVIDER. The
Database Explorer and other tools scan HKEY_CLASSES_RO OT\CLSID looking for all entries that have a key with the above name. For examples, have a look in the registry at the CLSIDs for MSDAORA and SqlServer.

regards
roy fine

"Duncan Winn" <te**@test1.co. uk> wrote in message
news:ur******** ******@TK2MSFTN GP09.phx.gbl...
I have written an Ole Db provider. It seems to be registered in the Operating system to a degree, but not fully, i.e. I can access it
from a
client that I have written. But it does not appear in Database

Explorer's
list of viable Ole Db drivers...

Any suggestions??




Nov 16 '05 #4
Roy,

thanks for the help....
sounds as if you have used the ATL Provider
templates to develop your OLEDB Provider
Yep that's correct. I am brand new to providers and I was thrown in the deep
end so I thought that was the best place to start.
make sure that you have an entry in the registry under the
CLSID with Key Name of OLE DB PROVIDER
I have looked in the registry editor and I have found the following .. e.g.

HKEY_CLASSES_RO OT (this is a folder)
CDFAP.CDFap (this is a folder)
CLSID (this is a folder)
Name (Default) Type REG_SZ Data {A6D8083D-8B.... etc}
CDFAP.CDFap.1 (this is a folder)
CLSID (this is a folder)
Name (Default) Type REG_SZ Data {A6D8083D-8B.... etc}

So does this mean that I need to change the Default to OLE DB PROVIDER, or
are you talking about something entirly different? The provides is
available in the list from the UDL step 2 you talked me through........
2. Open the UDL, and select a Provider and the DataSource
So maybe this side of things is OK???
6. Select the Open button, and then select a table from the list
displayed.
No tables are displayed when I select my provider only the following gets
imbedded in my spread sheet:

[oledb]
; Everything after this line is an OLE DB initstring
Provider=CCDFap Source Object;Persist Security Info=False;User
ID="";Data Source=cdf_db;L ocation=D:\fums \cdf_db;Mode=Re ad;Extended
Properties=""

Any suggestions???
I hope this helps...


Yes it does, I have found very few people available to advise me about
providers, your help over the past few months (you have responded to alot of
my messages) has been a real God send.

Thanks,
Duncan.
Nov 16 '05 #5
Duncan,

I have looked in the registry editor and I have found the following .. e.g.
HKEY_CLASSES_RO OT (this is a folder)
CDFAP.CDFap (this is a folder)
CLSID (this is a folder)
Name (Default) Type REG_SZ Data {A6D8083D-8B.... etc}
CDFAP.CDFap.1 (this is a folder)
CLSID (this is a folder)
Name (Default) Type REG_SZ Data {A6D8083D-8B.... etc}

Wrong place -- that's the ProgID - it is the posh, human friendly name -
we are looking for the nasty computer readable name - the CLSID. Here
is a snip from the registry for the Microsoft SqlServer OLEDB Provider:

/* *************** *************** ****** */
Windows Registry Editor Version 5.00

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}]
@="SQLOLEDB"
"OLEDB_SERVICES "=dword:fffffff f

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\E xtended
Errors]
@="Extended Error Service"

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\E xtended
Errors\{C0932C6 2-38E5-11d0-97AB-00C04FC2AD98}]
@="SQLOLEDB Error Lookup"

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\I mplemen
ted Categories]

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\I mplemen
ted Categories\{D26 7E19A-0B97-11D2-BB1C-00C04FC9B532}]

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\I nprocSe
rver32]
@="C:\\Progra m Files\\Common Files\\System\\ OLE DB\\sqloledb.dl l"
"ThreadingModel "="Both"

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\O LE DB
Provider]
@="Microsoft OLE DB Provider for SQL Server"

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\P rogID]
@="SQLOLEDB.1 "

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\V ersionI
ndependentProgI D]
@="SQLOLEDB"
/* *************** *************** ****** */

if is the following entry that the provider enumerator is looking for:

[HKEY_CLASSES_RO OT\CLSID\{0C7FF 16C-38E3-11d0-97AB-00C04FC2AD98}\O LE DB
Provider]
@="Microsoft OLE DB Provider for SQL Server"

Have a look in the registery on any machine that has MDAC 2.5 or later
installed.
6. Select the Open button, and then select a table from the list
displayed.
No tables are displayed when I select my provider only the following

gets imbedded in my spread sheet:

[oledb]
; Everything after this line is an OLE DB initstring
Provider=CCDFap Source Object;Persist Security Info=False;User
ID="";Data Source=cdf_db;L ocation=D:\fums \cdf_db;Mode=Re ad;Extended
Properties=""

Any suggestions???


Now I think we are looking at an oledb provider that does not implement
all of the required interfaces. I hope this isn't taken as pedantic
exercise, but have you had a look at these links:

http://msdn.microsoft.com/library/en...ppendixd_1.asp

http://msdn.microsoft.com/library/de.../en-us/dnado/h
tml/dnadoxtooledbma pping.asp

and specifically, have you implemented the IDBSchemaRowset interface?
This is not a required interface, and, if i recall correctly, it is only
necessary for cases like the one we are looking at - namely an app that
needs to enumerate the tables in your provider's store(i.e. enumerate
the schemas and then get info on each schema). It has been a while
since I have messed with this part of the provider, and I shall look
into it a bit more later this evening, if i get a chance, else i'll
investigate a bit more tomorrow...

regards
roy fine
..

Nov 16 '05 #6
Roy,
Have a look in the registry on any machine that has MDAC 2.5 or later
installed.
When you say registry are you talking about the ProviderName.re g files. My
(atl) provider does not seem to have one, I believe it was registered
automatically. The closest I have come to finding it is a file called
"REGISTRY" which just contains binary data, and a file called .rgs. But I
have a feeling that the provider is registered successfully as I can view it
in Borland Builder's list of available Ole Db providers, and I have
successfully created a client that can access it??? (Using Regedit I can
only find what I showed you last time).
Now I think we are looking at an oledb provider that does not implement
all of the required interfaces.
I am sure this is true!!!!
and specifically, have you implemented the IDBSchemaRowset interface?


I believe I have (to a degree) but I don't really understand what is going
on here (I just went through Lon Fishers article step by step, which told me
what to do but not always why!). In my CDFapSess.h class I have the
following three implementations for:

class CCDFapSessionTR SchemaRowset;
class CCDFapSessionCo lSchemaRowset;
class CCDFapSessionPT SchemaRowset;

i.e....

class CCDFapSessionTR SchemaRowset :
public CSchemaRowsetIm pl< CCDFapSessionTR SchemaRowset, CTABLESRow,
CCDFapSession>
{
public:
BEGIN_PROPSET_M AP(CCDFapSessio nTRSchemaRowset )
BEGIN_PROPERTY_ SET(DBPROPSET_R OWSET)
PROPERTY_INFO_E NTRY(IAccessor)
PROPERTY_INFO_E NTRY(IColumnsIn fo)
PROPERTY_INFO_E NTRY(IConvertTy pe)
PROPERTY_INFO_E NTRY(IRowset)
PROPERTY_INFO_E NTRY(IRowsetIde ntity)
PROPERTY_INFO_E NTRY(IRowsetInf o)
PROPERTY_INFO_E NTRY(CANFETCHBA CKWARDS)
PROPERTY_INFO_E NTRY(CANHOLDROW S)
PROPERTY_INFO_E NTRY(CANSCROLLB ACKWARDS)
PROPERTY_INFO_E NTRY_VALUE(MAXO PENROWS, 0)
PROPERTY_INFO_E NTRY_VALUE(MAXR OWS, 0)
END_PROPERTY_SE T(DBPROPSET_ROW SET)
END_PROPSET_MAP ()

HRESULT Execute(LONG* pcRowsAffected, ULONG, const VARIANT*)
{
USES_CONVERSION ;
//CTextFile tf;
CTABLESRow trData;
lstrcpyW(trData .m_szType, OLESTR("TABLE") );
lstrcpyW(trData .m_szDesc, OLESTR("The Text File Table"));
TCHAR szFile[255];
_tcscpy(szFile, _T("c:\\code\\m yprov\\sample.t xt"));
lstrcpynW(trDat a.m_szTable, T2OLE(szFile),
SIZEOF_MEMBER(C TABLESRow, m_szTable));
if (!m_rgRowData.A dd(trData))
return E_OUTOFMEMORY;
*pcRowsAffected = 1;
return S_OK;
}//END OF Execute

It will look into it further as it is not implemented properly yet.

Thanks,

Duncan.
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1166
by: Duncan Winn | last post by:
I have developed an Ole DB provider using Visual Studio.NET ATL and C++. What is the best was to redistribute this. Are the any free installation packages about, do I even require an installation package or is there an easier way to register it. Thanks, Duncan.
2
1983
by: glenn | last post by:
I have written a COM Server in C# and its working perfectly. I am not ready to deploy to client computers to begin the real testing and am now wondering how to perform. The part that confuses me is that you can not use regsvr32 to register the COM server so I'm wondering if placing it inside the .NET library will automatically take care of...
2
1209
by: umberto | last post by:
Hello, Is it nessesary to run the GAC program when I put new dll into BIN folder on my horst provider server ? Or just to put it and it will be able to use functions wchich that dll contains ? Best greetings, Robert A.
2
1560
by: gjuro kladaric | last post by:
hi there, I am just learning about IFormattable, ICustomFormatter, IFormatProvider and the like... although being a bit tricky to understand, it becomes clear after some clicking and readying... what is not clear to me and constitutes my question is:
13
3032
by: noone | last post by:
consider the following problem: You have a C style library and API that uses callbacks to implement functionality. Examples of this are X11 API, OpenGL/GLUT...The List goes on. The power of virtuals in C++ leads us to want to implement a framework where those callbacks are simply overriden virtual methods in a derived class. So...
1
1781
by: -D- | last post by:
I am trying to use multiple sitemaps within my site as described in the following MSDN article: http://msdn2.microsoft.com/en-us/library/ms178426.aspx I tried adding the following to the web.config file: <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings> <add...
3
3191
by: =?Utf-8?B?TWFyY0c=?= | last post by:
I have a Server.Transfer in my asp:Login LoggedIn event handler. I am forcing transfer to a specific page since I do not want to use the ReturnURL that is in Request.Params (i.e., the user addressed some particular page and was redirected to the login form and would be returned there.). The control's DestinationUrl is only used if the login...
2
2213
by: linuxfedora | last post by:
I have written a C# program which has an activeX control (abc.ocx) in Visual Studio 2005, and used the setup and deployment project to create an setup.exe and setup.msi that act as an installer. And i found that when i install the setup in Windows XP, it is okey, the abc.ocx can be installed automatically. But when i try to install the...
0
2097
by: Tim Spens | last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote: I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via callback.setHandler1(callback1) this only seems to affect pythons ability to trigger an "event" in c. PyObject *Handler is always NULL even after I call...
0
7612
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8053
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7576
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5443
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5165
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3583
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2027
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.