升级SqlCe2.0数据库文件到3.0版本

来源:互联网 发布:vb系列vba汉化 编辑:程序博客网 时间:2024/05/21 17:04
准备工作,这里假设已经安装好SqlCe2.0了。
PC端:
首先需要安装好Microsoft SQL Server 2005 Compact Edition和Microsoft SQL Server 2005 Compact Edition Tools。安装完毕后安装目录里(默认是C:/Program Files/Microsoft Visual Studio 8/SmartDevices/SDK/SQL Server/Mobile/v3.0/%Platform%/%Processer%/)有upgrade.exe文件。
 
Windows Mobile端
安装SqlCe30 Core(sqlce30.%Platform%.%Processer%.CAB),
SqlCe30 Repl(sqlce30.repl.%Platform%.%Processer%.CAB),
SqlCe30 Dev(sqlce30.dev.%Language%.% Platform %.% Processer %.CAB)
将upgrade.exe拷贝到PDA上。
 
好了,现在可以执行升级程序了。同时按住enter键和屏幕右上角的时钟,点击弹出菜单的“运行”。在运行对话框里输入需要执行的命令,点击确性运行。
升级程序的详细命令如下。
UPGRADE [/S] [source path] [/SP] [source password] [/D] [destination path] [/DP] [destination password] [/E] [encrypt destination]
/S The path to the source database file
/SP The password for the source database file (optional)
/D The path to the destination database file. Any existing files will be overwritten
/DP The password for the destination database file (optional)
/E Encrypt the destination database file. A password for the destination database file must also be set
/Q Perform upgrade silently
 
示例:upgrade /S Northwind.sdf /D Northwind30.sdf
这个命令的意思是升级“我的设备”下的Northwind.sdf,输出到“我的设备”的Northwind.sdf
 
原创粉丝点击