Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Question! Pin
David Crow30-Jun-09 10:45
David Crow30-Jun-09 10:45 
Questionhow to use inpout32.dll in vc++208 clr project Pin
PIYUSH196630-Jun-09 8:11
PIYUSH196630-Jun-09 8:11 
AnswerRe: how to use inpout32.dll in vc++208 clr project Pin
Sarath C30-Jun-09 9:43
Sarath C30-Jun-09 9:43 
QuestionCreate a C++ dll to be called from JAVA and PHP Pin
Galo Vinueza S.30-Jun-09 7:37
Galo Vinueza S.30-Jun-09 7:37 
AnswerRe: Create a C++ dll to be called from JAVA and PHP Pin
Stuart Dootson30-Jun-09 9:43
professionalStuart Dootson30-Jun-09 9:43 
QuestionVS and Qt linking differences Pin
thebeekeeper30-Jun-09 7:16
thebeekeeper30-Jun-09 7:16 
AnswerRe: VS and Qt linking differences Pin
Stuart Dootson30-Jun-09 9:29
professionalStuart Dootson30-Jun-09 9:29 
QuestionConstructing and Accessing a RecordSet from COM in C++ Pin
BeerFizz30-Jun-09 5:14
BeerFizz30-Jun-09 5:14 
I am accessing a DLL written in VB which has a number of methods. This DLL is designed to sign onto a sqlserver database and return various information depending on the methods called.

To date I have managed to CoCreateInstance and successfully access several of these methods.

My issue is this: Several of these methods return a record set with possibly multiple rows of data and I have no idea how to create a record set in VC++ and how access it.

This is the description of one of the methods I am trying to use:
<br />
GetCustomerList()<br />
	Returns a RecordSet of all customer fields<br />
<br />
Required Properties<br />
	LastName<br />
<br />
RecordSet Layout<br />
	uidCustomerID<br />
	strCustNo<br />
	strMem_Ext<br />
	strTitle<br />
	strFirstName<br />
	strMiddleInitial<br />
	strLastName<br />


In code (I have removed pieces to make it easier to read), you can see how I have accessed some of the methods:

The method GetCustomerList requires the property of LastName to be set prior to calling and will return a RecordSet of all the Customers with the last name given.

How do I construct this record set and walk through it?

Thanks for all help
Phil

		_WebRes *wr;
                hresult=CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, __uuidof(_WebRes), (LPVOID *)&wr);
//      
                bool bCon = wr->Connect("GXX", "");
                bool bSUser = wr->SetUser("GXX");
//
                BSTR bstrMess;
//
                wr->FirstName = "Davis";
                wr->LastName = "Phil";
                wr->PhoneNo = "123 456 7890";
                wr->Display = "Davis, Phil";
                wr->Email = "phil@email.com";
//
                bool bCust = wr->CreateCustomer(&bstrMess);
//
                CString str(bstrMess);
                MessageBox(str);       // this works fine
//
                wr->LastName = _bstr_t ("Davis");
                Record Set = wr->GetCustomerList();  // what to do here.
 
//
//  the above call to GetCustomerList will return a RecordSet of all the customers with a 
//  last name  Davis.  The Record set will contain the information about each individual customer
//
//  How do I create and access this recordset in 'C' 
//

AnswerRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 5:44
professionalStuart Dootson30-Jun-09 5:44 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ [modified] Pin
BeerFizz30-Jun-09 6:10
BeerFizz30-Jun-09 6:10 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 7:04
professionalStuart Dootson30-Jun-09 7:04 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
BeerFizz30-Jun-09 6:13
BeerFizz30-Jun-09 6:13 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 6:59
professionalStuart Dootson30-Jun-09 6:59 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
BeerFizz30-Jun-09 10:38
BeerFizz30-Jun-09 10:38 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 11:24
professionalStuart Dootson30-Jun-09 11:24 
Questioncreating and writing data to an xml file in vc++6.0 Pin
kir_MFC30-Jun-09 3:44
kir_MFC30-Jun-09 3:44 
AnswerRe: creating and writing data to an xml file in vc++6.0 Pin
Naveen30-Jun-09 4:30
Naveen30-Jun-09 4:30 
QuestionWhy have you reposted this? Pin
led mike30-Jun-09 4:37
led mike30-Jun-09 4:37 
AnswerRe: creating and writing data to an xml file in vc++6.0 Pin
David Crow30-Jun-09 4:45
David Crow30-Jun-09 4:45 
QuestionCapture Ctrl+Pgup event Pin
reply2am30-Jun-09 2:02
reply2am30-Jun-09 2:02 
AnswerRe: Capture Ctrl+Pgup event Pin
David Crow30-Jun-09 3:44
David Crow30-Jun-09 3:44 
Questionreading and writing xml files in vc++6.0 Pin
kir_MFC30-Jun-09 1:17
kir_MFC30-Jun-09 1:17 
AnswerRe: reading and writing xml files in vc++6.0 Pin
Madhu Nair30-Jun-09 1:28
Madhu Nair30-Jun-09 1:28 
GeneralRe: reading and writing xml files in vc++6.0 Pin
kir_MFC30-Jun-09 3:04
kir_MFC30-Jun-09 3:04 
QuestionRe: reading and writing xml files in vc++6.0 Pin
David Crow30-Jun-09 3:10
David Crow30-Jun-09 3:10 

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.