Click here to Skip to main content
16,005,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat is the function of "PASCAL" in function declaration? Pin
Maer72730-Aug-01 4:24
Maer72730-Aug-01 4:24 
AnswerRe: What is the function of Pin
Joaquín M López Muñoz30-Aug-01 5:34
Joaquín M López Muñoz30-Aug-01 5:34 
GeneralRe: What is the function of Pin
Maer72730-Aug-01 16:24
Maer72730-Aug-01 16:24 
GeneralADO Refresh Method in C++ Pin
Bigge30-Aug-01 3:56
Bigge30-Aug-01 3:56 
GeneralRe: ADO Refresh Method in C++ Pin
CodeGuy30-Aug-01 4:15
CodeGuy30-Aug-01 4:15 
GeneralRe: ADO Refresh Method in C++ Pin
Bigge30-Aug-01 4:39
Bigge30-Aug-01 4:39 
GeneralRe: ADO Refresh Method in C++ Pin
CodeGuy30-Aug-01 4:52
CodeGuy30-Aug-01 4:52 
GeneralRe: ADO Refresh Method in C++ Pin
Rashid Thadha30-Aug-01 4:22
Rashid Thadha30-Aug-01 4:22 
here is a example with Create Parameters

_RecordsetPtr pRS ;
_CommandPtr pcmdStoredProc;

try
{
    hr = pcmdStoredProc.CreateInstance(__uuidof(Command));
    if(FAILED(hr))
        _com_issue_error(hr);

    pcmdStoredProc->ActiveConnection = <Your Connection>

    pcmdStoredProc->CommandType = adCmdStoredProc;
    pcmdStoredProc->CommandText = _bstr_t("<Stored Proc Name>");

    _ParameterPtr param;
    _variant_t vtReturnVal(0L);
    _variant_t vtReturnVal2(0L);

    // example of output parameter
    param = pcmdStoredProc->CreateParameter(_T("<Param 1 Name>"),adInteger,adParamOutput,sizeof(long),vtReturnVal);
    pcmdStoredProc->Parameters->Append(param);

    param = pcmdStoredProc->CreateParameter(_T("<Param 2 Name>"),adInteger,adParamOutput,sizeof(long),vtReturnVal2);
    pcmdStoredProc->Parameters->Append(param);

    // example of input parameter
    param = pcmdStoredProc->CreateParameter(_T("<Param 3 Name>"),adInteger,adParamInput,sizeof(long), _variant_t((long)10));
    pcmdStoredProc->Parameters->Append(param);

    param = pcmdStoredProc->CreateParameter(_T("Param 4 Name>"),adInteger,adParamInput,sizeof(long), _variant_t((long)-1));
    pcmdStoredProc->Parameters->Append(param);

    pRS = pcmdStoredProc->Execute(NULL, NULL, adCmdStoredProc);
}
catch(_com_error& e)
{
    CString sBuff = GetErrorDescription(e);
    AfxMessageBox(sBuff);
    return;
}
catch(...)
{
    AfxMessageBox("Unknown Error Occured");
    return;
}

Cool | :cool:
GeneralUse DataBase In Dialog base Program Pin
Ghasrfakhri30-Aug-01 3:31
Ghasrfakhri30-Aug-01 3:31 
Generalmaneging mouse move Pin
Ghasrfakhri30-Aug-01 3:28
Ghasrfakhri30-Aug-01 3:28 
GeneralRe: maneging mouse move Pin
Christian Graus30-Aug-01 12:26
protectorChristian Graus30-Aug-01 12:26 
Generalchenge Edit Box (with CEdit) Pin
Ghasrfakhri30-Aug-01 3:20
Ghasrfakhri30-Aug-01 3:20 
QuestionCEdit ? Pin
otvac30-Aug-01 3:09
otvac30-Aug-01 3:09 
GeneralMFC problem Pin
Ghasrfakhri30-Aug-01 2:27
Ghasrfakhri30-Aug-01 2:27 
GeneralRe: MFC problem Pin
Christian Graus30-Aug-01 12:27
protectorChristian Graus30-Aug-01 12:27 
QuestionHow to create a floating toolbox? Pin
Huong30-Aug-01 2:06
Huong30-Aug-01 2:06 
QuestionHOW DO I DO IT ???? Pin
The_Server30-Aug-01 1:55
The_Server30-Aug-01 1:55 
AnswerRe: HOW DO I DO IT ???? Pin
Malcolm McMahon30-Aug-01 2:07
Malcolm McMahon30-Aug-01 2:07 
AnswerRe: HOW DO I DO IT ???? Pin
Michael Martin30-Aug-01 2:10
professionalMichael Martin30-Aug-01 2:10 
GeneralMSFlexgrid(rowselection) Pin
30-Aug-01 1:26
suss30-Aug-01 1:26 
GeneralRe: MSFlexgrid(rowselection) Pin
ORi x30-Aug-01 1:42
ORi x30-Aug-01 1:42 
Generalproblem in formview Pin
30-Aug-01 1:20
suss30-Aug-01 1:20 
GeneralXML insertBefore Pin
Jimmy Ehrnström30-Aug-01 0:43
Jimmy Ehrnström30-Aug-01 0:43 
GeneralRe: XML insertBefore Pin
Alwin7530-Aug-01 3:34
Alwin7530-Aug-01 3:34 
GeneralRe: XML insertBefore Pin
Jimmy Ehrnström30-Aug-01 3:47
Jimmy Ehrnström30-Aug-01 3:47 

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.