问:使用DSN [英] Q: using DSN
本文介绍了问:使用DSN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我有以下几行来从web.config读取连接字符串;
string cStr = ConfigurationSettings.AppSettings [" connectionString" ];
SqlConnection sqlConn = new SqlConnection(cStr);
this.sqlConnection1.ConnectionString = cStr;
如何更换这是我在目前的
机器中定义的DSN(ODBC连接)吗?
谢谢,
Hello,
I have the following lines to read connection string from web.config;
string cStr = ConfigurationSettings.AppSettings["connectionString"];
SqlConnection sqlConn = new SqlConnection(cStr);
this.sqlConnection1.ConnectionString = cStr;
How can replace this with a DSN (ODBC connection) I defined in my current
machine?
Thanks,
推荐答案
Jim,
看看:
http://www.connectionstrings.com/
问候
Daniel Walzenbach
" JIM.H." <季** @ discussions.microsoft.com> schrieb im Newsbeitrag
新闻:8D ********************************** @ microsof t.com ...
Jim,
have a look at:
http://www.connectionstrings.com/
Regards
Daniel Walzenbach
"JIM.H." <JI**@discussions.microsoft.com> schrieb im Newsbeitrag
news:8D**********************************@microsof t.com...
你好,我有以下几行来从web.config读取连接字符串;
字符串cStr = ConfigurationSettings.AppSettings [" ; connectionString"];
SqlConnection sqlConn = new SqlConnection(cStr);
this.sqlConnection1.ConnectionString = cStr;
如何用DSN替换它(ODBC连接)我在我当前的
机器中定义了吗?
谢谢,
Hello,
I have the following lines to read connection string from web.config;
string cStr = ConfigurationSettings.AppSettings["connectionString"];
SqlConnection sqlConn = new SqlConnection(cStr);
this.sqlConnection1.ConnectionString = cStr;
How can replace this with a DSN (ODBC connection) I defined in my current
machine?
Thanks,
嗨丹尼尔,
谢谢你的支持答复。我正在检查那个网站我没有真正看到
如何在那里使用名为myDSN的DSN进行SQL服务器连接。你能给我具体的例子吗?
谢谢,
Daniel Walzenbach写道:
Hi Daniel,
Thanks you for your reply. I was checking that site I did not really see
how I could use a DSN called myDSN for SQL server connection in there. Can
you give me specific example?
Thanks,
"Daniel Walzenbach" wrote:
吉姆,
看看:
http://www.connectionstrings.com/
问候
Daniel Walzenbach
>JIM.H. <季** @ discussions.microsoft.com> schrieb im Newsbeitrag
新闻:8D ********************************** @ microsof t.com。 ..
Jim,
have a look at:
http://www.connectionstrings.com/
Regards
Daniel Walzenbach
"JIM.H." <JI**@discussions.microsoft.com> schrieb im Newsbeitrag
news:8D**********************************@microsof t.com...
您好,
我有以下几行来从web.config读取连接字符串;
字符串cStr = ConfigurationSettings.AppSettings [" connectionString"] ; sqlConnection sqlConn = new SqlConnection(cStr);
this.sqlConnection1.ConnectionString = cStr;
如何用我当前定义的DSN(ODBC连接)替换它
机器?
谢谢,
Hello,
I have the following lines to read connection string from web.config;
string cStr = ConfigurationSettings.AppSettings["connectionString"];
SqlConnection sqlConn = new SqlConnection(cStr);
this.sqlConnection1.ConnectionString = cStr;
How can replace this with a DSN (ODBC connection) I defined in my current
machine?
Thanks,
Jim,
你试过这些条目吗?
a .. DSN:
" DSN = myDsn; Uid = username; Pwd = ;"
a ..文件DSN:
" FILEDSN = c:\ myData.dsn; Uid = username; Pwd =;"
Daniel
" JIM.H." <季** @ discussions.microsoft.com> schrieb im Newsbeitrag
新闻:5E ********************************** @ microsof t.com ...
Jim,
have you tried those entries?
a.. DSN:
"DSN=myDsn;Uid=username;Pwd=;"
a.. File DSN:
"FILEDSN=c:\myData.dsn;Uid=username;Pwd=;"
Daniel
"JIM.H." <JI**@discussions.microsoft.com> schrieb im Newsbeitrag
news:5E**********************************@microsof t.com...
嗨丹尼尔,
感谢您的回复。我正在检查那个我没有真正看到的网站
如何在那里使用名为myDSN的DSN进行SQL服务器连接。你可以给我一些具体的例子吗?
谢谢,
" Daniel Walzenbach"写道:
Hi Daniel,
Thanks you for your reply. I was checking that site I did not really see
how I could use a DSN called myDSN for SQL server connection in there. Can
you give me specific example?
Thanks,
"Daniel Walzenbach" wrote:
吉姆,
看看:
http://www.connectionstrings.com/
问候
Daniel Walzenbach
>JIM.H. <季** @ discussions.microsoft.com> schrieb im Newsbeitrag
新闻:8D ********************************** @ microsof t.com。 ..
Jim,
have a look at:
http://www.connectionstrings.com/
Regards
Daniel Walzenbach
"JIM.H." <JI**@discussions.microsoft.com> schrieb im Newsbeitrag
news:8D**********************************@microsof t.com...
>你好,
>我有以下几行来从web.config读取连接字符串;
>
> string cStr = ConfigurationSettings.AppSettings [" connectionString"];
> SqlConnection sqlConn = new SqlConnection(cStr);
> this.sqlConnection1.ConnectionString = cStr;
>
>如何用我在
>中定义的DSN(ODBC连接)替换它。当前
>机器?
>谢谢,
>
> Hello,
> I have the following lines to read connection string from web.config;
>
> string cStr = ConfigurationSettings.AppSettings["connectionString"];
> SqlConnection sqlConn = new SqlConnection(cStr);
> this.sqlConnection1.ConnectionString = cStr;
>
> How can replace this with a DSN (ODBC connection) I defined in my
> current
> machine?
> Thanks,
>
这篇关于问:使用DSN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文