ConnectionString:不支持关键字

时间:2017-01-14 06:41:08

标签: visual-studio

如果有人可以提供帮助,我很高兴......

Visual Studio : 2015,
Data Connection Properties,
Identity Name : PropApp,
Connection String : Data Source= TOH-PC; Initial Catalog=PropApp; Integrated Security=True,
State: Open,
Type : Microsoft SQL Server (SQL Server Authentication),
Version : 13.00.4199,
Case Sensitive: False,
Owner : TOH-PC\TOH

遇到错误:

Private Sub Form1_Load()
con.connectionstring="TOH-PC; Initial Catalog=PropApp; Integrated Security=True"

System.ArgumentException occurred
Additional Information: Keyword not supported : 'toh-pc; initial catalog'.

感谢您在Advance中提供的帮助。

1 个答案:

答案 0 :(得分:0)

...解决 在连接字符串中包含“服务器”。

Private Sub Form1_Load()     con.connectionstring =“Server = TOH-PC; Initial Catalog = PropApp; Integrated Security = True”