Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / September 2005

Tip: Looking for answers? Try searching our database.

How to make custom OLE DB provider browsable from VStudio 2003 IDE?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Max Motovilov - 23 Sep 2005 02:23 GMT
Hi All,

I have (am developing) an OLE DB provider for a proprietary database format.
Among other things, I'd like to be able to browse the table contents from
the Server Explorer built into the Visual Studio 2003 IDE. At this point, I
am able to connect to my provider and browse the schema information (tables,
columns). However, an attempt to "Retrieve Data from Table" results in an
error message: "Item cannot be found in the collection corresponding to the
requested name or ordinal". I have verified in debugger that
IOpenRowset::OpenRowset() is not called. The message looks like something
originating in ADO (or ADO.Net?), perhaps a missing property? I have checked
which properties are requested from the data source object (session is not
queried) and found nothing suspicious.

My data provider supports IOpenRowset only, it doesn't create or support
commands. I have tried to connect to it from Visual Studio 2005 beta and
noticed that it tries to call IOpenRowset::OpenRowset() but passes in an SQL
statement instead of the table name! (the data source exposes
DBPROP_SQLSUPPORT with DBPROPVAL_SQL_NONE value but it doesn't seem to be
queried). Does Visual Studio 2003 also expect browsable OLE DB providers to
suport SQL unconditionally? What else might I be missing?

Thanks in advance for any ideas,
...Max...
Anton Klimov [MS] - 30 Sep 2005 00:35 GMT
Have you set OLEDB_SERVICES key for your provider under the corresponding
HKCR\CLISID\ ?
Signature

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

> Hi All,
>
[quoted text clipped - 20 lines]
> Thanks in advance for any ideas,
> ....Max...
Max Motovilov - 30 Sep 2005 00:53 GMT
This should be doing the trick, shouldn't it? Part of what the ATL wizard
generated for me...

...Max...

================ Registrar file =================
HKCR
{
 MFOLEDB.MFB.1 = s 'MapFrame MFB Database'
 {
    CLSID = s '{685BE5D0-2A20-4FD6-9924-867A965AEFA5}'
 }
 MFOLEDB.MFB = s 'MapFrame MFB Database'
 {
    CLSID = s '{685BE5D0-2A20-4FD6-9924-867A965AEFA5}'
    CurVer = s 'MFOLEDB.MFB.1'
 }
 NoRemove CLSID
 {
    ForceRemove {685BE5D0-2A20-4FD6-9924-867A965AEFA5} = s 'MapFrame MFB
Database'
    {
       ProgID = s 'MFOLEDB.MFB.1'
       VersionIndependentProgID = s 'MFOLEDB.MFB'
       InprocServer32 = s '%MODULE%'
       {
          val ThreadingModel = s 'Apartment'
       }
       'OLE DB Provider' = s 'MapFrame MFB Database'
       val AppID = s '%APPID%'
       val OLEDB_SERVICES = d '4294967295'
       'TypeLib' = s '{79AF4CFD-CC20-4D25-B802-23983204469B}'
    }
  }
}
===========================================

> Have you set OLEDB_SERVICES key for your provider under the corresponding
> HKCR\CLISID\ ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.