RE: Problem with _CommandPtr



Do you use something like #import in your code?
If I remember correctly if you import some of the newer MDAC dlls then you
could have problems when running with the older versions.
Either you have to import the older versions when you build your application
or you need to update your machines up to the newer common version.

"Kumar" wrote:

> 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.oledb)
  • 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)