Dim oCnn As Object Dim s_Sql As String Set oCnn = CreateObject("ADODB.connection") oCnn.connectionstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;pwd=sa;Initial Catalog=zw" oCnn.ConnectionTimeout = 30 oCnn.Open s_Sql="delete from xxxx where xxxxxxx" oCnn.Execute (s_Sql) Set oCnn=Nothing
Dim oCnn As Object Dim s_Sql As String Set oCnn = CreateObject("ADODB.connection") oCnn.connectionstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;pwd=sa;Initial Catalog=zw" oCnn.ConnectionTimeout = 30 oCnn.Open s_Sql="drop table temp" oCnn.Execute (s_Sql) Set oCnn=Nothing