Click here to Skip to main content
15,923,015 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: How to do this properly with STL? Pin
Joao Vaz23-Sep-02 4:02
Joao Vaz23-Sep-02 4:02 
GeneralRe: How to do this properly with STL? Pin
Mark Tutt23-Sep-02 4:14
Mark Tutt23-Sep-02 4:14 
GeneralRe: How to do this properly with STL? Pin
Joao Vaz23-Sep-02 6:17
Joao Vaz23-Sep-02 6:17 
GeneralRe: How to do this properly with STL? Pin
Mark Tutt23-Sep-02 15:52
Mark Tutt23-Sep-02 15:52 
AnswerRe: How to do this properly with STL? Pin
Joaquín M López Muñoz23-Sep-02 9:09
Joaquín M López Muñoz23-Sep-02 9:09 
GeneralRe: How to do this properly with STL? Pin
Mark Tutt23-Sep-02 10:41
Mark Tutt23-Sep-02 10:41 
GeneralRe: How to do this properly with STL? Pin
Joao Vaz23-Sep-02 21:08
Joao Vaz23-Sep-02 21:08 
GeneralOLEDB (CCommand) Problem Pin
ramjan23-Sep-02 0:22
ramjan23-Sep-02 0:22 
Hello,
I’m facing some problem when I want to send the ICommand interface to the Client to work around the data fetched from the Database by OLEDB provider. I can successfully query the database and traverse through the Rowset at the Server end. When I’m packing the ICommand interface in a variant (as dispatch), at the Client End it throws the Error “No such interface supported”).

Here is the excerpt from my code

HRESULT CDAC::GetCommand (BSTR bstrQuery, VARIANT *pvarColumnInfo, VARIANT *pvarCmd)
{
HRESULT hr;
CSession session;
CCommand<cdynamicaccessor, crowset=""> objCmd;
LONG lRetVal;

try
{
USES_CONVERSION;

// Getting the Database connection by using the connection string
lRetVal = GetDBConnection();

// Creating the session for the transaction
hr = session.Open(m_objDBSrc);
CHECK_HR(hr);

// Create the Command by using the session for the query
hr = objCmd.Create(objSession, bstrQuery);
CHECK_HR(hr);

// Command Optimization
hr = objCmd.Prepare();
CHECK_HR(hr);

// Execute the Command
hr = objCmd.Open();
CHECK_HR(hr);

// Place the column Information in the OUT VARIANT
pvarColumnInfo->vt = VT_BYREF;
pvarColumnInfo ->byref = (PVOID)cmdObj.m_pColumnInfo;

// Place the command object in the OUT VARIANT
pvarCmd->vt = VT_DISPATCH;
pvarCmd->pdispVal = (IDispatch*)cmdObj.m_spCommand.Detach();

// Unable to get the ICommand, return the error
if(pvarCmd ->pdispVal == NULL)
{
hr = E_FAIL;
goto CLEANUP;
}

}
catch(_com_error &ce)
{
ERRBOX(ce.ErrorMessage(), "Error");
hr = ce.Error();
goto CLEANUP;

}
catch(...)
{
ERRBOX("Unknown Error", "Error");
hr = E_UNEXPECTED;
goto CLEANUP;
}

// Successfully Completed. Return Success code.
hr = S_OK;

CLEANUP:
return hr;
}

Can anyone suggest that where I’m failing or how to pass the Command information from the Server to Client?

Advance thanks,


Regards,
Ramesh M.
GeneralRe: OLEDB (CCommand) Problem Pin
Steve S24-Sep-02 0:38
Steve S24-Sep-02 0:38 
GeneralUse Vc dll in delphi Pin
Mazdak22-Sep-02 3:57
Mazdak22-Sep-02 3:57 
GeneralRe: Use Vc dll in delphi Pin
Alexandru Savescu24-Sep-02 0:22
Alexandru Savescu24-Sep-02 0:22 
GeneralMaybe lame question ... Pin
Mandalay18-Sep-02 5:50
Mandalay18-Sep-02 5:50 
GeneralRe: Maybe lame question ... Pin
Michael Dunn18-Sep-02 7:08
sitebuilderMichael Dunn18-Sep-02 7:08 
GeneralRe: Maybe lame question ... Pin
Ed Gadziemski20-Sep-02 10:50
professionalEd Gadziemski20-Sep-02 10:50 
QuestionNew to DCOM & ATL? Pin
srinivasa chary18-Sep-02 3:09
srinivasa chary18-Sep-02 3:09 
AnswerRe: New to DCOM & ATL? Pin
Paul M Watt18-Sep-02 5:16
mentorPaul M Watt18-Sep-02 5:16 
GeneralRe: New to DCOM & ATL? Pin
srinivasa chary18-Sep-02 19:45
srinivasa chary18-Sep-02 19:45 
GeneralATL Service, Window Messages and COM Pin
Michael P Butler17-Sep-02 22:20
Michael P Butler17-Sep-02 22:20 
GeneralRe: ATL Service, Window Messages and COM Pin
Ernest Laurentin24-Sep-02 19:15
Ernest Laurentin24-Sep-02 19:15 
GeneralATL_No_VTable Pin
suresh_sathya16-Sep-02 19:48
suresh_sathya16-Sep-02 19:48 
GeneralRe: ATL_No_VTable Pin
Joaquín M López Muñoz16-Sep-02 21:01
Joaquín M López Muñoz16-Sep-02 21:01 
GeneralRecommended Books for STL Pin
Joe Woodbury14-Sep-02 18:41
professionalJoe Woodbury14-Sep-02 18:41 
GeneralRe: Recommended Books for STL Pin
Paul M Watt14-Sep-02 20:55
mentorPaul M Watt14-Sep-02 20:55 
GeneralRe: Recommended Books for STL Pin
Pavel Klocek14-Sep-02 21:43
Pavel Klocek14-Sep-02 21:43 
GeneralRe: Recommended Books for STL Pin
Stuart Dootson14-Sep-02 22:27
professionalStuart Dootson14-Sep-02 22:27 

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.