安装过程中连接字符串不适用于DataDirectory [英] Connection string is not working with DataDirectory in setup

查看:70
本文介绍了安装过程中连接字符串不适用于DataDirectory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,
我的设置有问题.连接字符串无法正常工作.
我正在使用C#,VS2010和sqlserver2008.

我的问题是,当我使用

Dear sir,
i have problem in my setup. The connection string is not working properly.
I am working With C#,VS2010 and sqlserver 2008.

My problem is that when i m working with

"Data Source=.;Initial Catalog=crm;Persist Security Info=True;User ID=**;Password=******"

连接字符串可以正常工作.
但是当我使用

connection string it''s working properly.
but when i m working with

"Data Source=.;Initial Catalog=|DataDirectory|\\crm.mdf;Persist Security Info=True;User ID=**;Password=*****"

连接字符串不起作用.

该数据库具有sqlserver身份验证....


谢谢....

connection string it''s not working .

The database has sqlserver authentication ....


Thanks....

推荐答案

使用此链接检查您的连接字符串.

http://www.connectionstrings.com/ [ ^ ]

谢谢.
Use this link to check your connection string.

http://www.connectionstrings.com/[^]

Thanks.


尝试

try

"Data Source=yourdatasource; Initial Catalog=dbname;uid=username;pwd=password;"


这篇关于安装过程中连接字符串不适用于DataDirectory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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