当前位置: 动力学知识库 > 问答 > 编程问答 >

vb.net 2010 - Working with Microsoft SQL server 2005

问题描述:

I am attempting to use code like the following

Sub newDatabase()

Dim command as New sqlcommand

End Sub

Unfortunately sqlcommand isn't recognized by my vb.NET 2010. Is there anything I have to do before using that line?

网友答案:

Have you imported the namespace System.Data.SqlClient at the top of your code?

Imports System.Data.SqlClient

...
Sub newDatabase()
   Dim command as New SqlCommand()
   ...
End Sub
分享给朋友:
您可能感兴趣的文章:
随机阅读: