Click here to Skip to main content
15,897,334 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting Current Directory Pin
Nish Nishant15-May-02 1:12
sitebuilderNish Nishant15-May-02 1:12 
GeneralRe: Setting Current Directory Pin
Prem Kumar15-May-02 2:27
Prem Kumar15-May-02 2:27 
GeneralRe: Setting Current Directory Pin
Andy Latham15-May-02 2:37
Andy Latham15-May-02 2:37 
GeneralRe: Setting Current Directory Pin
Prem Kumar15-May-02 3:41
Prem Kumar15-May-02 3:41 
GeneralModal dialog closing problem Pin
Patrick Riphagen15-May-02 0:21
Patrick Riphagen15-May-02 0:21 
GeneralRe: Modal dialog closing problem Pin
Nish Nishant15-May-02 0:28
sitebuilderNish Nishant15-May-02 0:28 
QuestionHow can extract a Return Value from a Stored Procedure with ADO Pin
youssef14-May-02 23:48
youssef14-May-02 23:48 
AnswerRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Jon Hulatt14-May-02 23:54
Jon Hulatt14-May-02 23:54 
I can't be arsed to read your code. But heres a snippet from some of my code that does what you want:

try {
		_CommandPtr pCommand;
		_ParameterPtr pRetVal;

		pCommand.CreateInstance(__uuidof(Command));
		pCommand->ActiveConnection = m_pConn;
		pCommand->CommandText = "p_YourProc";
		pCommand->CommandType = adCmdStoredProc;
	
		// Create and add return value param
		pRetVal = pCommand->CreateParameter ( _bstr_t ("RETURN_VALUE"), adInteger, adParamReturnValue, 0);
		pCommand->Parameters->Append(pRetVal);

		// create and add taskid param
		pCommand->Parameters->Append ( pCommand->CreateParameter( _bstr_t ("YourParamIn"),adInteger,adParamInput,0 ,_variant_t(lTicketId)));
		pCommand->Execute(NULL, NULL, adCmdStoredProc);

                // this is the bit you're interested in
		lSuccess = (DWORD) pRetVal->GetValue();
	} catch (_com_error e)
	{
		//handle error
	}


Signature space for rent. Apply Within.
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
youssef15-May-02 2:52
youssef15-May-02 2:52 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Jon Hulatt15-May-02 3:08
Jon Hulatt15-May-02 3:08 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Carlos Antollini15-May-02 3:27
Carlos Antollini15-May-02 3:27 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Jon Hulatt15-May-02 5:14
Jon Hulatt15-May-02 5:14 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Carlos Antollini15-May-02 5:27
Carlos Antollini15-May-02 5:27 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Jon Hulatt15-May-02 5:38
Jon Hulatt15-May-02 5:38 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Carlos Antollini15-May-02 5:48
Carlos Antollini15-May-02 5:48 
GeneralRe: How can extract a Return Value from a Stored Procedure with ADO Pin
Jon Hulatt15-May-02 5:46
Jon Hulatt15-May-02 5:46 
GeneralThreads and server side applications Pin
unknown soldier14-May-02 23:44
unknown soldier14-May-02 23:44 
GeneralRe: Threads and server side applications Pin
Nish Nishant14-May-02 23:55
sitebuilderNish Nishant14-May-02 23:55 
GeneralRe: Threads and server side applications Pin
unknown soldier15-May-02 0:01
unknown soldier15-May-02 0:01 
GeneralMulti-language Pin
14-May-02 23:43
suss14-May-02 23:43 
GeneralRe: Multi-language Pin
Christian Graus15-May-02 3:03
protectorChristian Graus15-May-02 3:03 
GeneralRe: Multi-language Pin
Paul M Watt15-May-02 8:27
mentorPaul M Watt15-May-02 8:27 
GeneralRe: Multi-language Pin
15-May-02 22:57
suss15-May-02 22:57 
GeneralHelp................................ Pin
johny quest14-May-02 23:26
johny quest14-May-02 23:26 
GeneralRe: Help................................ Pin
Jon Hulatt15-May-02 0:12
Jon Hulatt15-May-02 0:12 

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.