DBPROP_INIT_PROMPT implementation
- From: "Vivek" <vivekanand_bachche@xxxxxxxxxxxxxxxx>
- Date: Mon, 11 Feb 2008 18:10:56 +0530
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.
.
- Prev by Date: Re: Error: "Format of the initialization string does not conform to the OLE DB specification"
- Next by Date: Re: Error: "Format of the initialization string does not conform to the OLE DB specification"
- Previous by thread: Problem trying to update dbf table using VFPOLEDB.1 Provider
- Next by thread: OleDB Pool Size
- Index(es):
Relevant Pages
|