发表于:2006-01-18 16:30:00
3楼
如果用objRecordset.open 或objConnection.Execute strSQL,或set objRecordset=objConnection.Execute(strSQL)就更简单些。用objRecordset=objConnection.Execute(strSQL)方法如下:
Dim objConnection,objRecordset,strSQL
Set objConnection=CreateObject("ADODB.Connection")
Set objRecordset=CreateObject("ADODB.Recordset")
objConnection.Open "字符串"
strSQL="selet * from ......"
objConnection.Execute strSQL
set objRecordset=objConnection.Execute(strSQL)
.
.
.
set objRecordset=Nothing
objConnection.Close