Function execsql(ByVal strsql As String) As ADODB.Recordset
Dim rstaccess As ADODB.Recordset
Set cnn = New ADODB.Connection
conn.Open (conndb) --conndb为连接数据库的connectionstring
conn.Execute strsql
Set rstaccess = New ADODB.Recordset
Set execsql = rstaccess
End Function
Dim rstaccess As ADODB.Recordset
Set cnn = New ADODB.Connection
conn.Open (conndb) --conndb为连接数据库的connectionstring
conn.Execute strsql
Set rstaccess = New ADODB.Recordset
Set execsql = rstaccess
End Function
Dim rstaccess As ADODB.Recordset
Set cnn = New ADODB.Connection
conn.Open (conndb) --conndb为连接数据库的connectionstring
Set execsql = conn.Execute strsql
End Function
Dim rstaccess As ADODB.Recordset
Set cnn = New ADODB.Connection
conn.Open (conndb) --conndb为连接数据库的connectionstring
Set execsql = conn.Execute (strsql)
End Function