文件名称:VB连接sqlserver数据库
文件大小:1KB
文件格式:VBP
更新时间:2012-09-27 05:24:30
数据库
Dim s As String Dim rs As New ADODB.Recordset s = "Driver={SQL Server}; Database=trsip; UID=sa; PWD=oallserver; Server=10.47.1.12 " conn.ConnectionString = s conn.Open txtsql = "select top 1 * from book" Set rs = New ADODB.Recordset rs.Open txtsql, conn, _ adOpenKeyset, _ adLockOptimistic