问题描述:

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
相关阅读:
Top