ProviderNotFound error while connecting to SQL server.

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
mma
Newcomer
Posts: 3
Joined: Wed Sep 05, 2018 3:21 pm

ProviderNotFound error while connecting to SQL server.

Post by mma » Thu Sep 06, 2018 7:29 pm

Hi, I'm evaluating Nicelabel 2017 Trial by testing the SDK.SimplePrintSample.csproj. By modifying the path of the label file, I can print my labels. These labels take a value from an Excel table. So, the program basically works.

But as the second step, I want to modify the data source from Excel to Sql Server (I have a local SQLEXPRESS 2008 server).

I have a single dataset in label.DataSets, it is label.Datasets[0]. I've modified the ConnectionString and the CustomSql properties of label.Datasets[0] to such values that work fine in a dqy file (that is, Excel recognises both the connectionString and the query and shows the result set of the query. I also set ds[0].IsCustomSql = true;

My connection string is

Code: Select all

"DRIVER=SQL Server;SERVER=JUTAS\SQLEXPRESS;DATABASE=SPEDSTORE;UID=sa;Pwd=the-real-password".
But the label.Print method from throws a "ProviderNotFound" error (From

Code: Select all

EuroPlus.Databases.Core.OleDbDatabaseConnection.HandleConnectException(DatabaseException ex, IDataSetDescription dataSetDescription)
), and advises to download an Office database provider from this address:

http://www.nicelabel.com:80/Redirect?ID ... ersion=1.0.

This is an Access runtime. I've downloaded and installed it, but nothing has changed.

What should I do to make this work?

mma
Newcomer
Posts: 3
Joined: Wed Sep 05, 2018 3:21 pm

Re: ProviderNotFound error while connecting to SQL server.

Post by mma » Fri Sep 07, 2018 11:16 am

I've found the soulution here:
Saso wrote:
Mon May 18, 2015 10:16 pm

To construct the connection string for your SQL Server 2005 I would suggest you to visit the following site and do it yourself:
http://www.connectionstrings.com/
In my case, the good connection string is this:

Code: Select all

"Provider=SQLNCLI10;SERVER=JUTAS\SQLEXPRESS;DATABASE=SPEDSTORE;UID=sa;Pwd=the-real-password"

Post Reply