DBPROP_INIT_PROMPT implementation



Following is the code snippet of my test application.

############################################################################
#############################################
..
..
..
hr = CoCreateInstance(CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER,
IID_IDataInitialize, reinterpret_cast<LPVOID *>(&pIDataInitialize));

if (hr != S_OK)
goto EXIT;

hr = pIDataInitialize->GetDataSource(NULL, CLSCTX_INPROC_SERVER,
L"Provider=MYOLEDB;Data Source=myserver;User
ID=admin;Password=password;Initial Catalog=SYSTEM;Prompt=CompleteRequired",
IID_IDBInitialize, reinterpret_cast<IUnknown
**>(&pIDBInitialize));

if (hr != S_OK)
goto EXIT;

..
..
..
############################################################################
#############################################

I am testing OUR ole db provider.

I get error in pIDataInitialize->GetDataSource() as
"Format of the initialization string does not conform to the OLE DB
specification."

It works fine if I pass connection string removing last property, i.e.
L"Provider=MYOLEDB;Data Source=myserver;User
ID=admin;Password=password;Initial Catalog=SYSTEM"

So the problem is that the connection string contains
'Prompt=CompleteRequired' at the end. OUR provider returns DBPROMPT_NOPROMPT
for DBPROP_INIT_PROMPT property and allows consumer to set it accordingly.

Our provider implemeted this prompt functionality in
IDBInitialize::Initialize() using IDBPromptInitialize::PromptdataSource().

Probably there is something missing in this implimentation. May be I have to
implement some other properties/interfaces in conjuction with the
implementation DBPROP_INIT_PROMPT.

Can somebody help me understand this problem exactly so that I will be able
to correct it in OUR provider?

Thanks,
Vivek.


.



Relevant Pages

  • RE: Database Lookup Functoid Connection String
    ... A OLE DB provider is a COM component which implement a number of COM ... And connection string is a way to initialize a OLE DB provider. ... accessed by the BizTalk server account, ...
    (microsoft.public.biztalk.general)
  • Re: ODBC Drivers error 80040e31
    ... I've changed the connection string and am connecting with OLE DB provider now...we'll see if it makes any difference... ... Aaron Bertrand ...
    (microsoft.public.sqlserver.server)
  • Re: Delphi 7, MySQL and ADO
    ... The problem lies in the fact that the OLE DB ... provider from www.MySQL.com is from year 2001 and does not work correctly. ... want to use MySQL with ADO you'll have to do it through the ODBC, ... To be more concrete, when you create your connection string, you should ...
    (borland.public.delphi.database.ado)
  • Extended Properties of Microsoft.Jet.4.0 Provider
    ... Where can I get a detailed reference pertaining to the Extended Properties in ... the Connection String regarding the Microsoft.Jet.4.0 OLE DB ... Provider i.e. what the available parameters are for dealing with ...
    (microsoft.public.data.oledb)
  • Re: Replacement for Jet provider in application for XP Embedded
    ... provider and I've read that XP Embedded does not use the Jet engine. ... I would insure having system admin rights, and install MDAC 2.8. ... Next i'd review the programs connection string to insure it's using the ...
    (microsoft.public.vb.database)

Quantcast