This is a migrated thread and some comments may be shown as answers.
Microsoft Sql Server Comapct
3 Answers 41 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 20 Nov 2009, 12:43 PM
When going through the enable project wizard and selecting Microsoft Sql Server Comapct for the backend I am prompted to enter the server name and the database name. What should I enter here to connect to an existing database?

3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 20 Nov 2009, 03:30 PM
Hi Robert,

 The server and user name are something that are not required in the case of Sql Server Compact. We will fix this so that they are not required to be specified for CE. You can specify temporary strings for the server and username in the wizard and these will be ignored.
 In the database name, please specify the fully qualified path to the database file (.sdf).

Alternatively you can use the standard .NET connection string UI to specify the connection parameters.

Kind regards,
Ady
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert
Top achievements
Rank 1
answered on 20 Nov 2009, 06:28 PM
i tried a random string for the server name and a fully qualified path to the database but when i ran a test connection it failed. could you provide some more detail on using the built in connection strings with Telerik ORM?
0
Ady
Telerik team
answered on 23 Nov 2009, 02:50 PM
Hi Robert,

I did try specifying a temporary server name and a fully qualified path to the .sdf file and I could successfully connect to the database.
Please have a look at the 'Use standard connection settings' topic on this page for information about using .NET connection strings instead of the OpenAccess connection settings.

The wizard does not support specifying .NET connection strings for Visual Studio 2005. Nevertheless you can specify a connection string manually in the app.config file. Please add a 'connectionStrings' node under the <configuration> node with the path to the .sdf file -

<connectionStrings>
    <add name="DatabaseConnection1" connectionString="data source=&quot;D:\SQL CE databases\Northwind.sdf&quot;" providerName="Microsoft.SqlServerCe.Client.3.5" />
  </connectionStrings>

and the OpenAccess connection section would be
<connection id="DatabaseConnection1">
        <connectionString>Data Source=D:\SQL CE databases\Northwind.sdf</connectionString>
        <backendconfigurationname>sqlceConfiguration</backendconfigurationname>
      </connection>

This information is provided in the documentation link provided above.

Regards,
Ady
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Ady
Telerik team
Robert
Top achievements
Rank 1
Share this question
or