SQLServer 怎么和VB连到一起?
跪求各位高人,我的毕业设计是用VB做的,数据库用的是SQL,怎么才能连到一起呢?
把Adodc拖出来,测试连接得出字符串:con2.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind;Data Source=." '连接本机服务器
If con2.State = 0 Then
'连接字符串
con2.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind;Data Source=." '连接本机服务器
con2.Open
On Error Resume Next
'创建数据库,表及相关信息
con2.Execute "SQL语句"