Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function cnnCWO() As ADODB.Connection
On Error GoTo Err_cnnCWO
Set cnnCWO = New ADODB.Connection
With cnnCWO
.ConnectionString = "ODBC;Server=ServerName;DSN=NameofDSN;Database=NameofDatabase"
.ConnectionTimeout = 30
.CommandTimeout = 30
.CursorLocation = adUseClient
Call .Errors.Clear
Call .Open
End With
Exit_Function:
Exit Function
Err_cnnCWO:
MsgBox "An Error occured while connecting to the database. Contact the DBA for assistance."
Resume Exit_Function
End Function
Private Sub cmdAddMemo_Click()
On Error GoTo cmdAddMemoErr
Dim InsMemo As ADODB.Command
Dim SqlStr As String
Dim Memo As Object
Set Memo = Me.txtMemo
SqlStr = "exec sp_AddMemo_i '" & Memo.Value & "', '" & User & "'"
Set InsMemo = New ADODB.Command
InsMemo.ActiveConnection = cnnCWO
InsMemo.CommandText = SqlStr
InsMemo.Execute
Set InsMemo = Nothing
Exit_Sub:
Exit Sub
cmdAddMemoErr:
MsgBox Err.Description
Resume Exit_Sub
End Sub