vb.net连接sql2005的代码
我用的是定义了类,然后用代码连接DimstrConnAsString="Server=GSC;DataBase=conveyor;IntegratedSecurity=S...
我用的是定义了类,然后用代码连接
Dim strConn As String = "Server=GSC; DataBase=conveyor; Integrated Security=SSPI"
Dim da As DataStructure.DBDataSet = New DataStructure.DBDataSet
da.ConnStr = strConn
可是没反应啊!
请高手,大家不要从别处复制粘贴过来! 展开
Dim strConn As String = "Server=GSC; DataBase=conveyor; Integrated Security=SSPI"
Dim da As DataStructure.DBDataSet = New DataStructure.DBDataSet
da.ConnStr = strConn
可是没反应啊!
请高手,大家不要从别处复制粘贴过来! 展开
2个回答
展开全部
你猛游还没开始连呢!
Try
_SqlConn = New SqlClient.SqlConnection
_SqlConn.ConnectionString = "Server="枝态销 & _ServerName & ";Database=XXX;Uid=" & _UserName & ";Pwd="闭歼 & _Password & ";Connect Timeout=5"
_SqlConn.Open()
Return True
Catch e As Exception
SetErrInfo(e.Message)
Return False
End Try
Try
_SqlConn = New SqlClient.SqlConnection
_SqlConn.ConnectionString = "Server="枝态销 & _ServerName & ";Database=XXX;Uid=" & _UserName & ";Pwd="闭歼 & _Password & ";Connect Timeout=5"
_SqlConn.Open()
Return True
Catch e As Exception
SetErrInfo(e.Message)
Return False
End Try
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询