Click here to Skip to main content
15,894,410 members
Home / Discussions / Database
   

Database

 
GeneralNamed Commands in ADO from C++ Pin
[James Pullicino]20-Apr-04 1:19
[James Pullicino]20-Apr-04 1:19 
GeneralRe: Named Commands in ADO from C++ Pin
Mike Dimmick20-Apr-04 3:29
Mike Dimmick20-Apr-04 3:29 
Questioncan this query be optimized Pin
Anonymous19-Apr-04 22:55
Anonymous19-Apr-04 22:55 
AnswerRe: can this query be optimized Pin
Chris Meech20-Apr-04 5:33
Chris Meech20-Apr-04 5:33 
GeneralRe: can this query be optimized Pin
-Dr_X-20-Apr-04 10:06
-Dr_X-20-Apr-04 10:06 
GeneralRe: can this query be optimized Pin
Anonymous20-Apr-04 20:37
Anonymous20-Apr-04 20:37 
GeneralRe: can this query be optimized Pin
Chris Meech21-Apr-04 1:57
Chris Meech21-Apr-04 1:57 
QuestionHow to get 'IRowsetFind' interface in oledb sdk ! Pin
Member 74634419-Apr-04 18:43
Member 74634419-Apr-04 18:43 
How to get 'IRowsetFind' interface in oledb sdk !
dear all:

i will use following code in my program(C++) :
discover 'pICommandProperties->SetProperties(1,rgInitPropSet);' return failed code 'DB_S_ERRORSOCCURRED'
so 'pIRowset->QueryInterface(IID_IRowsetFind,(void **)&pIRowsetFind);' return failed!

dear all, please help me! how to get 'IRowsetFind' interface in oledb sdk , and how to use 'IRowsetFind->FindNextRow()'

InitProperties[0].dwPropertyID=DBPROP_IRowsetScroll;
InitProperties[0].dwOptions=DBPROPOPTIONS_REQUIRED;
InitProperties[0].dwStatus=DBPROPSTATUS_OK;
InitProperties[0].colid=DB_NULLID;
InitProperties[0].vValue.vt=VT_BOOL;
InitProperties[0].vValue.lVal=VARIANT_TRUE;

InitProperties[1].dwPropertyID=DBPROP_IRowsetFind;
InitProperties[1].dwOptions=DBPROPOPTIONS_REQUIRED;
InitProperties[1].dwStatus=DBPROPSTATUS_OK;
InitProperties[1].colid=DB_NULLID;
InitProperties[1].vValue.vt=VT_BOOL;
InitProperties[1].vValue.lVal=VARIANT_TRUE;

rgInitPropSet[0].cProperties=2;
rgInitPropSet[0].guidPropertySet=DBPROPSET_ROWSET;
rgInitPropSet[0].rgProperties=InitProperties;

hr=pICommandText->QueryInterface(IID_ICommandProperties,(void **)&pICommandProperties);

hr=pICommandProperties->SetProperties(1,rgInitPropSet);
if (DB_S_ERRORSOCCURRED==pICommandProperties->SetProperties(1,rgInitPropSet))
cout<< "test";
if(FAILED(hr))
{
cout<< "OLEDB Error !\r\nExecute Failed To Set Rowset Properties";
}
hr = pIRowset->QueryInterface(IID_IRowsetFind,(void **)&pIRowsetFind);
if(FAILED(hr))
{
cout << "Failed to get IID_IRowsetFind interface.\n";
cout << endl;
} //end if


laker
GeneralSQL Server - Information Schema Pin
bdi00719-Apr-04 14:20
bdi00719-Apr-04 14:20 
GeneralATL/MFC in Extended Stored Procedures Pin
Jim Cutler19-Apr-04 6:29
Jim Cutler19-Apr-04 6:29 
GeneralRe: ATL/MFC in Extended Stored Procedures Pin
Mike Dimmick19-Apr-04 9:17
Mike Dimmick19-Apr-04 9:17 
GeneralRe: ATL/MFC in Extended Stored Procedures Pin
Jim Cutler20-Apr-04 9:06
Jim Cutler20-Apr-04 9:06 
GeneralMicrosoft Desktop Engine Pin
Ankwa17-Apr-04 9:48
Ankwa17-Apr-04 9:48 
GeneralRe: Microsoft Desktop Engine Pin
earl17-Apr-04 9:58
earl17-Apr-04 9:58 
GeneralRe: Microsoft Desktop Engine Pin
Mike Ellison18-Apr-04 19:49
Mike Ellison18-Apr-04 19:49 
GeneralRe: Microsoft Desktop Engine Pin
jimpar19-Apr-04 4:30
jimpar19-Apr-04 4:30 
GeneralProblem in Using ADO in Visual C++ with SQL Server Pin
Touseef Afzal17-Apr-04 9:38
Touseef Afzal17-Apr-04 9:38 
GeneralRe: Problem in Using ADO in Visual C++ with SQL Server Pin
Hesham Amin17-Apr-04 20:46
Hesham Amin17-Apr-04 20:46 
GeneralRe: Problem in Using ADO in Visual C++ with SQL Server Pin
Roger Wright19-Apr-04 7:05
professionalRoger Wright19-Apr-04 7:05 
GeneralDatabase Results Strategy Pin
earl17-Apr-04 9:18
earl17-Apr-04 9:18 
Generalget DB Schema Pin
Silly Boy17-Apr-04 3:33
Silly Boy17-Apr-04 3:33 
GeneralRe: get DB Schema Pin
Mazdak17-Apr-04 3:39
Mazdak17-Apr-04 3:39 
GeneralUsing OJB.NET in an application Pin
ingramj17-Apr-04 2:01
ingramj17-Apr-04 2:01 
GeneralPlease Help !!!. How to set a backup sql server Pin
Member 101882317-Apr-04 1:09
Member 101882317-Apr-04 1:09 
GeneralRe: Please Help !!!. How to set a backup sql server Pin
RichardGrimmer18-Apr-04 22:21
RichardGrimmer18-Apr-04 22:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.