Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / December 2007

Tip: Looking for answers? Try searching our database.

Upgrade SQLServer CE database to 3.5

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
davepkz@hotmail.com - 30 Nov 2007 17:18 GMT
When trying to use the latest SSCE 3.5 for WinCE 6.0, my databases
created with SS 2005 will not open -- says they were "created by an
earlier version of SQL Server Compact."

So I tried to use the Upgrade.exe however that apparently wants the
source db to be SSCE 2.0, and I'm guessing mine are either 3.0 or 3.1.

How do I upgrade a db from 3.0/3.1 to 3.5?

For that matter, how do I tell for certain what version my db
currently IS?

Alternatively, can I create a brand new db in the 3.5 / WCE6.0
format?  It wouldn't be hard to regenerate my data.  It's just that SS
2005 is the only tool I have that creates SDF files and apparently
they are in the wrong format.

Thanks
Dave
Ginny Caughey [MVP] - 30 Nov 2007 19:28 GMT
Dave,

I believe that SQL 2008 Management Studio creates SSCE 3.5 files if you can
get your hands on a beta. Have you tried creating SDF files with VS 2008
data tools? I think they also create SSCE 3.5 files.

Signature

Ginny Caughey
Device Application Development MVP

> When trying to use the latest SSCE 3.5 for WinCE 6.0, my databases
> created with SS 2005 will not open -- says they were "created by an
[quoted text clipped - 15 lines]
> Thanks
> Dave
Simon Hart [MVP] - 02 Dec 2007 10:05 GMT
Alternatively to Ginny's post. If you are running the .NET CF 3.5 you can use
the new Upgrade method which is part of the SqlCeEngine class to upgrade your
database programmatically ie:

SqlCeEngine engine = new SqlCeEngine("Data Source=MyDB.sdf;");
engine.Upgrade ("Data Source=MyDB.sdf;encryption mode=platform default;");

Signature

Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com

> When trying to use the latest SSCE 3.5 for WinCE 6.0, my databases
> created with SS 2005 will not open -- says they were "created by an
[quoted text clipped - 15 lines]
> Thanks
> Dave
davepkz@hotmail.com - 04 Dec 2007 16:48 GMT
Ginny and Simon, thank you for your replies.

All of these ideas for creating or upgrading SSCE 3.5 DBs sound
reasonable.  Strangely, none of them are working for me (though for
completely different reasons) --

1. Use VS 2008 Data Tools
--> This is verified by the VS2008 Help docs, which say explicitly
that in Server Explorer you can create a new SS-CE 3.5 database.
However all db creation in VS2008 Server Explorer appears to be for
traditional Win32 SQL Server connectivity -- even "Create New SQL
Server Database" requires specification of a Server name.

2. Use SqlCeEngine.Upgrade in a .NET CF app
--> This was simple to build and deploy, but when I tried to run it on
the emulator, it gets to the Upgrade line and says "SQL Server Compact
made an unsupported request to the host operating system."    I tried
simply calling CreateDatabase instead of Upgrade and got the same
message, and that implies something isn't installed correctly.
However I verified that the install came from the VS2008 CAB files
(dated 10/2/2007) so I'd expect it to be right.

3. Use SQL Server 2008 Management Studio (Beta)
--> This one wouldn't even install!  On machines which never had SQL
Server installed before, the install exits before even bringing up the
Wizard - no message.  On machines which DID have SQL Server 2005, I
uninstalled 2005 first (readme says they cannot coexist) and then 2008
installs but Management Studio is not available - only Configuration
Manager.

This is not my day, is it?

Any insight into any of these roadblocks would be greatly
appreciated.  Note I only need one of these approaches to work -- any
one!

Thanks again
Dave
Ginny Caughey [MVP] - 04 Dec 2007 18:01 GMT
Dave,

Try this in VS 2008:

From Tools menu select Connect to Database. This should bring up the Add
Connection dialog. Click the Change... button to see all the database types
you can connect to. You should see Microsoft SQL Server Compact 3.5 listed.
Choose that then click OK. Now you should be able to create a new SSCE 3.5
database or browse to an existing one. If you browse to an existing sdf file
that is SSCE 3.0 or 3.1, when you click OK you should get an Upgrade to SQL
Server Compact 3.5 Database dialog that allows you to upgrade the file to
3.5. Once you are working with a SSCE 3.5 database, you can then use the VS
2008 data tools with it.

HTH,

Signature

Ginny Caughey
Device Application Development MVP

> Ginny and Simon, thank you for your replies.
>
[quoted text clipped - 34 lines]
> Thanks again
> Dave
davepkz@hotmail.com - 04 Dec 2007 19:27 GMT
Hmm... the strange thing is Microsoft SQL Server Compact 3.5 doesn't
appear in that db type list.  I wonder if something got messed up in
how VS2008 was installed or configured.

However, I did find this: if I create a new .NET CF project, right
click, select Add... New Item, "Database File" is one of the options,
and it does indeed create the SDF I was looking for.

Also, I found that the SQL Server 2008 Beta that I was trying to
install was the Express version and there is another full featured
version that does have Management Studio.

So in any case it looks like I'm ready to go.  Thanks once more for
your replies.
Dave
Ginny Caughey [MVP] - 04 Dec 2007 19:38 GMT
Dave,

It sounds like you may need to repair your VS 2008 installation. I tested
with VS 2008 Professional release version.

Signature

Ginny Caughey
Device Application Development MVP

> Hmm... the strange thing is Microsoft SQL Server Compact 3.5 doesn't
> appear in that db type list.  I wonder if something got messed up in
[quoted text clipped - 11 lines]
> your replies.
> Dave
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.