LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI 8.01 ActiveX SQL access denied.

luyy,

Jonathan contacted me regarding your problem and I have been looking into the issue.  I think there has been some misundstanding of the actual problem.  It is clear from your description of the problem and the sample code you provided that you are specifying a particular server when calling ADODB_New_Connection to create the ADO object.  It sounds like you are passing the name of the SQL server you are trying to access.  That is not the meaning of this parameter.  This parameter is used to indicate the machine that is running the ADO ActiveX server that will host your ADO object.  For most applications this is the local machine.  You indicate the local machine by just passing the default value of "" for this parameter.  Once you have created your ADO object, then you proceed to configure a connection to your SQL server, which is where you provide the SQL server name/database/connection information.

The reason you are seeing a change of behavior from CVI 7.0 to 8.0 is because we fixed a bug in CA_CreateObjectByClassIdEx during that time.  The bug was that when you specified a particular server to host the ActiveX object but the local machine could also host the same ActiveX object, the server information was ignored and the object was quietly hosted on the local machine.  The fix was to always honor the particular server specified and not create the object on the local machine.  Because of the bug in CVI 7.0, the server you specified in the call to ADODB_New_Connection was being ignored and the ADO object was being created on your local machine (which is probably exactly what you want).  In CVI 8.0, we honor the server you specified and try to create the ADO object on that server.  Of course, this is probably not what you want and you have probably not setup all the firewall/permissions/DCOM settings necessary to do that.  So the creation of the ADO object on the remote server fails and you get the error you have been seeing.

So you should be able to change the server parameter to ADODB_New_Connection to "" and everything should work fine.  Let me know if I am misunderstanding the problem.

Hope that helps.

-Jeff



Message 21 of 23
(1,271 Views)

Hi, Jeff,

My CVI8.0 application works now with the SQL server. Thank you for the help and clarification.

Your explanation is exact what I want to know about the ActiveX change from CVI7.0 to CVI8.0. However, my question is, are there any other ActiveX changes besides that? Because we trust your NI product so much and heavily rely on CVI ActiveX. Is it possible to post the detail description of the bug fixes for each CVI upgrade somewhere on NI website so that we as customers can understand the problem easily instead of being placed in the dark to bother your NI technical support staff and R&D engineer? This way can save time for all of us although I really appreciate your help.

 

 

0 Kudos
Message 22 of 23
(1,252 Views)
luyy,

I'm glad this solved your problem.  Regarding your request for other fixes between CVI 7.0 and 8.0, I'm sorry but we do not maintain a list of that information.  Beginning with CVI 8.0.1, we started including a list of fixes with each maintenance release (these are fix-only releases where only the third number in the version changes).  The idea was that fixes are the only thing in a maintenance release and listing the fixes might help a customer decide whether to update to the maintenance release.  For normal releases, the driving factor for an upgrade is more likely the new features.  Also, many more fixes are made during a normal release and it is a lot more work to track each fix and attempt to write a brief but useful description for each one.  As you might suspect, many of the fixes address minor and/or arcane issues that do not lend themselves to brief description.

Be assurred that I have passed along your feedback.

-Jeff

0 Kudos
Message 23 of 23
(1,238 Views)