VB引用MS ADO库,然后程序里面这么定义Dim Conn As New ADODB.ConnectionDim oRs As New ADODB.RecordsetDim StrSql As StringConn.Open "DRIVER=SQL Server;SERVER=xxx.xxx.xxx.xxx;UID=sa;PWD=xxx;database=xxx;"StrSql = "SQL语句"oRs.Open StrSql, Conn, 1, 1使用ors就行了