Click here to Skip to main content
15,918,268 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMCI control Pin
devvvy28-Oct-02 9:18
devvvy28-Oct-02 9:18 
GeneralGrid Printing Pin
Anthony988728-Oct-02 9:05
Anthony988728-Oct-02 9:05 
GeneralMFC hinstances Pin
will138328-Oct-02 8:25
will138328-Oct-02 8:25 
GeneralRe: MFC hinstances Pin
Christian Graus28-Oct-02 8:41
protectorChristian Graus28-Oct-02 8:41 
QuestionHow to create a moveable CStatic object? Pin
work_to_live28-Oct-02 8:01
work_to_live28-Oct-02 8:01 
AnswerRe: How to create a moveable CStatic object? Pin
ian mariano28-Oct-02 18:24
ian mariano28-Oct-02 18:24 
GeneralRe: How to create a moveable CStatic object? Pin
work_to_live28-Oct-02 20:57
work_to_live28-Oct-02 20:57 
GeneralCalling a stored procedure and retrieving the recordset Pin
youssef28-Oct-02 7:26
youssef28-Oct-02 7:26 
Hi,

I use a stored procedure for retrieve some recordset from my database.

I can calling my stored procedure but I can read my Recordset.

please find my sample :

_CommandPtr pCmd2("ADODB.Command");
pCmd2->ActiveConnection = m_pConn2;
//Store procedure
pCmd2->CommandText = "CheckNumSeg2";
pCmd2->CommandType = adCmdStoredProc;

pParam2 = pCmd2->CreateParameter ( _bstr_t ("TEST"), adVarChar,
adParamInput, strFileName.GetLength (), (_bstr_t) strFileName);
pCmd2->Parameters->Append ( pParam2);

_RecordsetPtr pRecordset;
pRecordset.CreateInstance(__uuidof(Recordset));
pRecordset = pCmd2->Execute(NULL, NULL, adCmdStoredProc);


pRecordset.Release(); //Only after this line is executed will the parameters be filled in Parameters collection.

//I would like to know how many record the stored procedure return me
long lnumCount = 0;
pRecordset->GetRecordCount();

//Close the DATABASE
if ( (m_pConn2->State & adStateOpen) == adStateOpen)
{
m_pConn2->Close();
}


Best Regards


youssef
GeneralRe: Calling a stored procedure and retrieving the recordset Pin
ian mariano28-Oct-02 17:53
ian mariano28-Oct-02 17:53 
GeneralRe: Calling a stored procedure and retrieving the recordset Pin
youssef28-Oct-02 22:17
youssef28-Oct-02 22:17 
QuestionProblem when declare CArray? Pin
ooosawaddee328-Oct-02 7:18
ooosawaddee328-Oct-02 7:18 
AnswerRe: Problem when declare CArray? Pin
Shog928-Oct-02 7:49
sitebuilderShog928-Oct-02 7:49 
GeneralRe: Problem when declare CArray? Pin
ooosawaddee328-Oct-02 8:31
ooosawaddee328-Oct-02 8:31 
AnswerRe: Problem when declare CArray? Pin
30-Oct-02 17:59
suss30-Oct-02 17:59 
GeneralCustom Calendar Control Pin
JennyP28-Oct-02 6:57
JennyP28-Oct-02 6:57 
GeneralRe: Custom Calendar Control Pin
alex.barylski28-Oct-02 12:13
alex.barylski28-Oct-02 12:13 
GeneralPlease, help... STUCK Pin
Xeena28-Oct-02 6:44
Xeena28-Oct-02 6:44 
GeneralRe: Please, help... STUCK Pin
ian mariano28-Oct-02 17:59
ian mariano28-Oct-02 17:59 
GeneralOnKeyDown().. How to determine simultaneous key presses. Pin
clintsinger28-Oct-02 6:19
clintsinger28-Oct-02 6:19 
GeneralRe: OnKeyDown().. How to determine simultaneous key presses. Pin
Paul M Watt28-Oct-02 6:48
mentorPaul M Watt28-Oct-02 6:48 
GeneralRe: OnKeyDown().. How to determine simultaneous key presses. Pin
Chris Richardson28-Oct-02 14:20
Chris Richardson28-Oct-02 14:20 
GeneralCListCtrl image format Pin
rrrado28-Oct-02 5:31
rrrado28-Oct-02 5:31 
GeneralRe: CListCtrl image format Pin
Shog928-Oct-02 16:52
sitebuilderShog928-Oct-02 16:52 
GeneralRe: CListCtrl image format Pin
rrrado28-Oct-02 21:20
rrrado28-Oct-02 21:20 
QuestionIs pipe an effiecient way for communication between threads? Pin
Wenrich28-Oct-02 4:38
Wenrich28-Oct-02 4:38 

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.