SQL Server Developer Center >
SQL Server Forums
>
SQL Server Compact
>
ConnectionString Builder not working for SLQ CE connection VS 2008
ConnectionString Builder not working for SLQ CE connection VS 2008
- I'm dropping a sqlCeConnection1 on my form in C#. When I select this connection and try to build the connection properties for the ConnnectionString, nothing appears in my VS Properties. (With SQL Express or OldDB connection objects a dialog box will appear for a <new connection>
Any ideas?
Thanks
Fritz Switzer
Answers
- Hi Fritz,
Read this first if you wanna learn 'bout Sql Server CE :
http://www.microsoft.com/sqlserver/2005/en/us/compact.aspx
-Harrie-
if that is what you want, just mark it as answer- Marked As Answer byChunSong Feng -MSFTMSFT, ModeratorFriday, November 06, 2009 10:30 AM
- Proposed As Answer byChunSong Feng -MSFTMSFT, ModeratorMonday, November 02, 2009 3:23 AM
All Replies
- Hi Fritz,
take a look at these connectionstrings:
http://connectionstrings.com/sql-server-2005-ce
Regards,
-Harrie- - Thanks Harrie,
But it is not the "connection string", it is the loss of the Connection String Builder that is part of the Properties page when you drop a sqlCeConnection on a WinForm.
With other connections, OleDbConnection or SqlConnection my Visual Studio 2008 properties box for those connections will have a "drop down" arrow that will let me build the connection string. With sqlCeConnection there is no drop down arrow.
My question is : Is this normal? How can I fix it?
Thanks
Fritz
Fritz Switzer - Do you mean there isn't any drop down arrow in "Add Connection" Windows Properties while you add "Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5)" as Data Source??
SqlCEConnection database is file based, it is not like SqlServer that has server side.
It's a normal for SqlCEConnection. Just click on Create if you don't have any database file, or click Browse if you have had one.
Happy Coding and Welcome to SQL Server Compact World ;)
-Harrie- - Harrie,
Sorry, it is a bit difficult to describe the VS 2008 screen I know, thank you for your persistence.
Here are the steps. (Winforms project)
1. Select and drop a SqlCeConnection from the Toolbox on the form. (creates a sqlCeConnection1 on the bottom of the form. )
2. Open the Properties Tab for the sqlCeConnection1 where you can select different properties, e.g. (Name),ConnectionString,ConnectionTimeout, etc.
3. Place curson on the ConnectionString property....here is where you will find a drop down arrow for any other type of Connection, sqlConnection, oleDbConnection, OdbcConnection.
This is what I cannot find and appears to be missing. I can type in the field "Data Source=foo.sdf" however, I just want to know why/where the dropdown is and where the ConnectionString builder is?
Thanks again for your perseverence.
Fritz
Fritz Switzer - Hi Fritz,
There isn't any drop down arrow for ConnectionString Builder in SqlCEConnection Properties. Why are you so depending on properties rather than code by yourself??
You don't have to add SqlCEConnection if you can code it. Just import the reference and make connectionstring in code form.
Here is the sample code:
Imports System.Data.SqlServerCe ... Dim connCE As SqlCeConnection = Nothing connCE = New SqlCeConnection("Data Source=" & SourcePath) ...
-Harrie- - Harrie,
Thank you for your comments.
Because all of the other Connections have the drop down, I would have thought the SqlCeConnection would behave consistently. Seems a bit "hay-bagged" that it doesn't act like the other connections.
And yes, I know I can set the properties in code.
So it goes,
Fritz
Fritz Switzer - Hi Fritz,
Read this first if you wanna learn 'bout Sql Server CE :
http://www.microsoft.com/sqlserver/2005/en/us/compact.aspx
-Harrie-
if that is what you want, just mark it as answer- Marked As Answer byChunSong Feng -MSFTMSFT, ModeratorFriday, November 06, 2009 10:30 AM
- Proposed As Answer byChunSong Feng -MSFTMSFT, ModeratorMonday, November 02, 2009 3:23 AM


