Private Sub Command49_Click() Dim rec1 As New ADODB.Recordset Dim cn1 As New ADODB.Connection Set cn1 = CurrentProject.Connection Dim cm1 As New ADODB.Command Set cm1.ActiveConnection = cn1 Dim sql As String cn1.CursorLocation = adUseClient
On Error GoTo err
sql = "drop proc [" + Trim(Me.Text42) + "]" Connect: Dim i i = MsgBox("確定要?jiǎng)h除存儲(chǔ)過(guò)程 [" + CS(Me.Text42) + "],(Y/N),?", vbYesNo, "刪除提示") If i = vbNo Then Exit Sub Else End If
cm1.CommandTimeout = 1200 cm1.CommandText = sql cm1.Execute
Exit Sub
err:
MsgBox "錯(cuò)誤代碼: " & err.Number & vbCrLf & vbCrLf & _ "錯(cuò)誤描述: " & err.Description, vbCritical + vbOKOnly, theTitle End Sub
|