vs2005连接SQL :语法错误请教
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadDim sqlcon As Data.SqlClient.SqlConnection
Dim sqlCom As Data.SqlClient.SqlCommand
Dim ds As Data.DataSet
ds = New Data.DataSet()
sqlcon = New Data.SqlClient.SqlConnection("Data Source=****;Initial Catalog=sq_bshq;Persist Security Info=True;User ID=***;Password=***")
sqlcon.Open()
sqlCom = New Data.SqlClient.SqlCommand("selete * from man", sqlcon)
Dim sda As Data.SqlClient.SqlDataAdapter
sda = New Data.SqlClient.SqlDataAdapter()
sda.SelectCommand = sqlCom
sda.Fill(ds, "cxd")-----------提示这里语法错误!怎么解决?
Console.WriteLine(ds.Tables("cxd").Rows(0)(0))
End Sub
class1.vb中怎么写可以把Data.SqlClient.SqlConnection写成SqlConnection?
新手上路,请多指教