DevExpress DatabaseVersionMismatch尚未创建数据库时出错

时间:2015-04-13 04:40:43

标签: azure devexpress xaf

我在Azure中运行Windows 2012服务器的虚拟机实例。

我已将SQL Server Express 2012安装到计算机上

我已经点击一次部署了我的DevExpress xaf应用程序。

我编辑了.exe.config文件以获得以下连接字符串

 <add name="ConnectionString" connectionString="Integrated Security=False;MultipleActiveResultSets=True;User Id=sa;Password=nottelling;Pooling=false;Data Source=.\SQLEXPRESS;Initial Catalog=mytest"/>

我使用ODBC数据源管理员来检查我是否可以连接到SQL Server实例。

但是当我尝试运行应用程序时,我收到以下错误

The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.
This error occurred  because the automatic database update was disabled when the application was started without debugging.
To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, or manually create a database using the 'DBUpdater' tool.
Anyway, refer to the 'Update Application and Database Versions' help topic at http://help.devexpress.com/#Xaf/CustomDocument2795 for more detailed information. If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/ 
Inner exception:

通常,当我运行应用程序时,数据库会创建并自行播种

1 个答案:

答案 0 :(得分:0)

事实证明(感谢Paul Usher)我能够将DBUpdater exe文件复制到Azure中的应用程序目录(使用剪切和粘贴)

然后我打开了dos提示符并对应用程序配置文件运行了更新程序。

这创建了数据库,甚至运行了我的播种方法