HomeActive Query BuilderActiveX Connection Provider required by Client?

ActiveX Connection Provider required by Client?


We have tried using the ActiveX QueryBuilder with the 'SQLNCLI10' OLEDB provider specified in the connection string.

In the testing environment this works really well for identifying new column types in SQL Server 2008 databases. However, in production this did not work until we installed the OLEDB provider directly on the client's PC from the SQL Server 2008 setup disk: SQLNCLI.msi.

Is this a restriction of the ActiveX product, that the end-user needs to have the OLEDB provider installed on their PC, rather than installing it on the server?
Jeremy | email
December 10 2010, 02:04 AM
Dear Jeremy,

ActiveX controls are running on the client side. Thus, they require all necessary OLE DB providers to be installed on the client PC.
Sergey Smagin | email
1 day, 5 hours since original post
Hi Sergey

OK I see. I understand that this would would not be a problem using the SQLOLEDB provider we were using earlier as it is installed as part of Windows. I'll work out how we can automatically install the SQLNCLI10 provider on the client.

Is there any reason why the SQLNCLI10 provider should not work accessing a SQLSERVER 2005 database? The following code is throwing an "Error: Unspecified error." on the last line. It works fine accessing the same database with the same connection string from code behind without using the ActiveX control. It also works when specifying the SQLOLEDB provider in the connection string instead, but we need to use the SQLNCLI10 provider for the reason I mentioned originally.

qb = window.document.forms[0].QueryBuilder;
qb.setAttribute("Connected", false);
qb.setAttribute("SQLSyntax", 12);
qb.setAttribute("WorkOffline", false);
qb.setAttribute("ConnectionString", "Provider=SQLNCLI10;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TestDB;Data Source=TestServer\InstanceName;");
qb.setAttribute("Connected", true);

In addition, is there some way to get a better error message out of the ActiveX control?
Jeremy | email
2 days, 22 hours since original post
Dear Jeremy,

We checked Active Query Builder ActiveX Edition with SQLNCLI10 provider and MS SQL 2005 server on different workstations and found no problems.

You may get the error code by defining the OnError event handler.

Try to connect to your server from the client PC using the same connection string with the ADO tester tool (http://www.activequerybuilder.com/files/adotester.zip). This is simple application that help you to understand if the reason of the error is somewhere inside the ADO or it's something related to Active Query Builder.
Sergey Smagin | email
5 days, 2 hours since original post
Alternate way to load metadata to the component is using XML file. You may prepare a script that generates XML file with metadata on the server and places it somewhere at your web server. Then you may instruct the component to load metadata from this file. This way you won't have to establish direct connection to the database from client's PC. You may find details here: http://www.activedbsoft.com/helpdesk/index.php?pg=kb.page&id=1

Also if you build ASP.NET application, you may have a look at native ASP.NET solution: http://aspquerybuilder.net/
Sergey Smagin | email
5 days, 2 hours since original post
Hi Sergey

Thanks for the tester. We eventually tracked it down to a setting on our SQLServer database so all fixed! :)

Do you have an example of defining the onerror event handler?

Regarding using a script to generate XML files, we have tested it successfully but would need to give access to all the databases to whatever user our script was running as, so have decided it is unsuitable.

Cheers!
Jeremy | email
3 weeks, 6 days since original post
This topic is closed