12-22-2006 04:59 PM
12-26-2006 04:58 PM
12-27-2006 01:26 PM
12-27-2006 03:29 PM
Jonathan,
Thank you for the reply.
I put CVI 7.0 and CVI 8.01 on two different PCs to avoid the potential confusion or conflict.
The ADO2.8 function that I mentioned in my first post is in my ADO28_luyy.fp which was generated by ActiveX Controller Wizard. Then this function ADODB_New_Connection calls the low level CA_CreateObjectByClassIdEx which always returned negative error code on CVI 8.01 . The source code for this ADO function is listed below:
HRESULT CVIFUNC ADODB_New_Connection (const char *server,
int supportMultithreading, LCID locale,
int reserved, CAObjHandle *objectHandle)
{
HRESULT __result = S_OK;
GUID clsid = {0x514, 0x0, 0x10, 0x80, 0x0, 0x0, 0xAA, 0x0, 0x6D, 0x2E,
0xA4};
__result = CA_CreateObjectByClassIdEx (&clsid, server,
&ADODB_IID__Connection,
supportMultithreading, locale,
reserved, objectHandle);
return __result;
}
In addition, I have one question. While I was creating my ADO28_luyy.fp, on the screen "ActiveX Controller Wizard - Choose Server", I chose "Microsoft ActiveX Data Objects 2.8 Library". Is this right?
Furthermore, I ran the example code "adotest" on both CVI7.0 and 8.01. To my surprise, both complainted "ActiveX control not registered on this computer" when the LoadPanel(..) function in the test.c was being executed. I am not sure how to set DCOM setting on a Windows XP Professional PC. Could you tell me?
I think it may be easier for you if I attached the source code for the ADO28_luyy.fp here.
Thank you again,
12-27-2006 03:31 PM
Jonathan,
I lost the attachment when I posted the last post. Here it is:
Thank you,
12-27-2006 03:42 PM
12-27-2006 03:55 PM
12-27-2006 04:26 PM
Jonathan,
Thank you for the excellent support.
After I changed the server name to NULL, the returned 'result' value is '0'.
My original code works fine for my CVI 7.0 machine, but not on CVI 8.01 machine.
My CVI 8.01 machine is a new PC which I got two weeks ago. Do you think it is very likely the remote machine (SQL server / ActiveX server ) doesn't set my CVI8.01 machine into the remote machine's DCOM setting?
Thanks,
12-27-2006 04:37 PM
01-19-2007 04:53 PM