Public Function del_Temp(xh As String) As Boolean
Dim cnora As ADODB.Connection
Set cnora = New ADODB.Connection
cnora.Open "Provider=ORAOLEDB.ORACLE.1;Password=upwd;User ID=uid;Data Source=udata"

Dim sqlDel As String

sqlDel = "delete from stu.yh where xh = '" & xh & "'"
cnora.Execute sqlDel

cnora.Close
Set cnora = Nothing
Exit Function
End Function


黑色头发:http://heisetoufa.iteye.com/