部署c#windows aplication [英] deployment of c# windows aplication

查看:48
本文介绍了部署c#windows aplication的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我想安装c#windows应用程序。

我安装了.net framework 3.5&系统中的sql server 2005.

我用连接字符串作为

hello,

i want to install c# windows application.
i have installed .net framework 3.5 & sql server 2005 in the system.
and i have used connection string as

(cn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Demo_DB.mdf;Integrated Security=True;User Instance=True");





但我收到的错误如下所述:< br $>




but i am getting error as mentioned below :

cannot create file ''c:\default company name\hotelsetup\newhotel_log.ldf'' because it already exists.<br />
change the file path or the file name. and retry the operation.<br />
could not open new database ''newhotel''. create database is aborted.<br />
cannot attach the file ''c:\default company name\hotelsetup\newhotel.mdf'' as database ''newhotel''<br />
file activation failure. the physical file name ''E:\c#.net\....'' may be





任何人都可以请给我解决方案?



i在b中有数据库在文件夹和项目文件夹中。





提前感谢



can anyone please give me the solution?

i have database in bin folder as well as in project folder.


thanks in advance

推荐答案

使用这些链接: -



http://msdn.microsoft.com/en-us/library/bb264564%28v=sql.90%29.aspx [ ^ ]



请参阅打开用户实例连接部分



此外: -



http://social.msdn.microsoft .com /论坛/ en-US / lightswitchgeneral / thread / 219f42cf-5c99-4a72-9acb-249210c835e2 / [ ^ ]





好​​运!!
Use these links:-

http://msdn.microsoft.com/en-us/library/bb264564%28v=sql.90%29.aspx[^]

See the section Opening a User-Instance Connection

Also this :-

http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/219f42cf-5c99-4a72-9acb-249210c835e2/[^]


Best of luck!!


这篇关于部署c#windows aplication的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆