Problem with _CommandPtr



Hi
I am working on a databases in VC++. I'm having the following problem that
in a function i've written these lines of code. The CreateInstance function
works fine with uuid(Command) on one system(Win XP) but returns "-2147467262"
(Interface not supported ) as hr value on other system(win 98) . Also thing
to note
is that CreateInstance for pConnection works fine on both systems. can
someone tell me what could be wrong with Command Object. Is there any chance
that Command Object is not available on other system..if yes then how can it
be made available.

Regards
Usman Jamil

//Here is the piece of code
_ConnectionPtr pConnection = NULL;
_CommandPtr pCommand = NULL;
HRESULT hr = pConnection.CreateInstance(__uuidof(Connection));
hr = pCommand.CreateInstance(__uuidof(Command));

thanks,
Kumar
.



Relevant Pages

  • problem with _CommandPtr
    ... I am working on a databases in VC++. ... The CreateInstance function ... someone tell me what could be wrong with Command Object. ... _ConnectionPtr pConnection = NULL; ...
    (microsoft.public.data.ado)
  • RE: Problem with _CommandPtr
    ... If I remember correctly if you import some of the newer MDAC dlls then you ... "Kumar" wrote: ... The CreateInstance function ... > someone tell me what could be wrong with Command Object. ...
    (microsoft.public.data.oledb)