Click here to Skip to main content
16,005,222 members
Home / Discussions / COM
   

COM

 
GeneralCOM app Pin
28-Jan-02 5:46
suss28-Jan-02 5:46 
GeneralRe: COM app Pin
Not Active28-Jan-02 8:33
mentorNot Active28-Jan-02 8:33 
GeneralRe: COM app Pin
30-Jan-02 2:57
suss30-Jan-02 2:57 
GeneralActiveX controls events Pin
Abdiel Jaramillo28-Jan-02 4:12
Abdiel Jaramillo28-Jan-02 4:12 
GeneralRe: ActiveX controls events Pin
28-Jan-02 4:38
suss28-Jan-02 4:38 
GeneralUpdating webpage from COM object without timers Pin
Joe Hastings26-Jan-02 3:41
Joe Hastings26-Jan-02 3:41 
GeneralRe: Updating webpage from COM object without timers Pin
6-Feb-02 9:00
suss6-Feb-02 9:00 
GeneralProblem in passing recordset from server to client Pin
ramjan24-Jan-02 3:05
ramjan24-Jan-02 3:05 
Hello,

I have some sort of problem in COM while passing the ADO recordset

object through variant to the client. In the server I can able to traverse

through the recordsetBlush | :O . Once I got the variant at the client end, the variant

contains the NULL (VT_EMPTY)Confused | :confused: .

What is the problem? For your clarity I'm putting some excerption from my

coding.


At Server_End

HRESULT CServer::Function1(VARIANT *pvarRSObj, VARIANT *pvarRetVal)
{
_RecordsetPtr pRSObj = NULL;

try
{
pRSObj->CreateInstance(__uuidof(Recordset));
pRSObj->Open(varQueryString, (IDispatch*)m_conObj,

adOpenKeyset, adLockBatchOptimistic, adCmdText);

pvarRSObj->vt = VT_DISPATCH;
pvarRSObj->pdispVal = (IDispatch*)pRSObj;
}
catch(_com_error &e)
{
ERRBOX(e.ErrorMessage());
return e.Error();
}
catch(...)
{
ERRBOX("Unknown Exception");
return E_FAIL;
}
return S_OK;
}


At Client_End

InvokeServer()
{
IServer *pServer;
//instantiation of server

pServer->Function1(&varRSObj, &varResponse);

CHECKVARIANTTYPE(&varRSObj); //It'll check the variant type
// this is showing me that variant contains VT_EMPTY.
if(varRSObj.vt == VT_DISPATCH)
{
//necessary action
}
}

Timely reply appreciated.


Regards,
Ramesh
GeneralRe: Problem in passing recordset from server to client Pin
Shadi Al-Kahwaji24-Jan-02 3:33
Shadi Al-Kahwaji24-Jan-02 3:33 
GeneralExecWB method on IE 5.0 ! (Urgent) Pin
rieta22-Jan-02 21:21
rieta22-Jan-02 21:21 
GeneralRe: ExecWB method on IE 5.0 ! (Urgent) Pin
28-May-02 2:16
suss28-May-02 2:16 
General-858993460 Pin
22-Jan-02 8:30
suss22-Jan-02 8:30 
GeneralRe: -858993460 Pin
Jamie Hale22-Jan-02 10:58
Jamie Hale22-Jan-02 10:58 
GeneralVARIANT as [out] parameters Pin
Nick Blumhardt21-Jan-02 16:34
Nick Blumhardt21-Jan-02 16:34 
GeneralRe: VARIANT as [out] parameters Pin
Rashid Thadha22-Jan-02 11:34
Rashid Thadha22-Jan-02 11:34 
GeneralRemote on win95 Pin
newbe21-Jan-02 9:10
newbe21-Jan-02 9:10 
GeneralRe: Remote on win95 Pin
Henrik Sternberg24-Jan-02 1:45
Henrik Sternberg24-Jan-02 1:45 
QuestionDoes the number of events affect Performance ?? Pin
Firoz17-Jan-02 19:00
Firoz17-Jan-02 19:00 
AnswerRe: Does the number of events affect Performance ?? Pin
Not Active18-Jan-02 2:42
mentorNot Active18-Jan-02 2:42 
AnswerRe: Does the number of events affect Performance ?? Pin
Jamie Hale22-Jan-02 8:54
Jamie Hale22-Jan-02 8:54 
GeneralBSTR Pin
newbe17-Jan-02 2:10
newbe17-Jan-02 2:10 
GeneralRe: BSTR Pin
Carlos Antollini17-Jan-02 2:38
Carlos Antollini17-Jan-02 2:38 
GeneralRe: BSTR Pin
Not Active17-Jan-02 5:28
mentorNot Active17-Jan-02 5:28 
GeneralRe: BSTR Pin
Ernest Laurentin17-Jan-02 5:26
Ernest Laurentin17-Jan-02 5:26 
GeneralRe: BSTR Pin
Not Active17-Jan-02 5:29
mentorNot Active17-Jan-02 5:29 

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.