需要关于这个非常奇怪的错误的建议
我试图通过以下方式建立与数据库的连接:
Dim sqCon As SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;Database=MegaDatabase;Integrated_Security=SSPI")
问题仅出现在这一行,它告诉我:
Array bounds cannot appear in type specifiers
尽管我使用相同的格式,但同样的问题不会出现在我的任何其他项目中。
我需要有人告诉我这到底出了什么问题以及我该如何解决这个问题。
感谢您的阅读。
I am trying to establish connection to a database through:
Dim sqCon As SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;Database=MegaDatabase;Integrated_Security=SSPI")
The problem is only on this line where it tells me that:
Array bounds cannot appear in type specifiers
The same problem does NOT appear in any of my other projects though I use this same format.
I need someone to tell me what exactly is wrong with this and how may I solve this.
Thanks for reading.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该(原始版本,现已更改)看起来不像有效语法。没有开头
"
字符,并且末尾有太多)
字符。但是,即使进行了修复,我认为您可能想要做的就是
dim
将其作为新变量,如下所示:That (original version, now changed) doesn't look anything like valid syntax. There's no opening
"
character and there's too many)
characters at the end.However, even with the fixes, I think what you probably wanted to do was to
dim
it as a new variable, something like:使用
New
关键字use the
New
keyword