This is a migrated thread and some comments may be shown as answers.

SQL CE Binding

3 Answers 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 26 Jan 2012, 01:12 AM
I'm trying to connect to a SQL CE database to run a report.  Not trying to design it or anything.

When I connect to a normal database it works but when I connect to:

Data Source=c:\UserProfiles\admin\Datasets\DEMODATASET2011.sdf;Persist Security Info=True;

I get an error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

The CE database is working fine otherwise.

Does my connect string need to be different?

Thanks,
Darren

3 Answers, 1 is accepted

Sort by
0
Accepted
Elian
Telerik team
answered on 26 Jan 2012, 04:32 PM
Hi Darren,

If you do not specify a provider name, by default it tries to connect to SQL Server. In your case, you have to specify the provider name (and you need to have the provider installed).

A sample connection string in the config file would look like this:
<add name="Name"
            connectionString="Data Source="c:\users\...""
            providerName="System.Data.VistaDB" />
--this is for VistaDB yours would be different probably something like "System.Data.SqlServerCe.SqlCeConnection"

Some references that might help you:
All the best,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
CEFRA
Top achievements
Rank 1
answered on 30 Jan 2012, 06:25 PM
I have de same problem, but i think that SQL CE is not suported by Telerik Reporting. My problen is when i try tu create a new report and i chose my connection and this fail, then i create a new connection and all is fine. Test my connection and is fine but when i try to creeate my Query in the wizard show me the same error other error is illegal characters.
0
Darren
Top achievements
Rank 1
answered on 30 Jan 2012, 10:24 PM
Yes Carlos, you have to upgrade to CE 4.0.
Tags
General Discussions
Asked by
Darren
Top achievements
Rank 1
Answers by
Elian
Telerik team
CEFRA
Top achievements
Rank 1
Darren
Top achievements
Rank 1
Share this question
or