Visual Basic 6 Code
Functions/Procedures
InQuotes Function
PauseTime Proc.
Remove Invld Chr Function
Database Insert Proc.
Database Select Function
Database Delete Proc.
Database Update Function
Make Enter key to act as TAB
Time calculation
Change 1st char to Ucase
Populate MSFlxGrid with db data
How to use CASE
Save file
Open file
Populate TreeView w/database
Catch RDO Error
This function Updates database
'****************************************************************** '* Value(s)passed: ..... '* Value(s)returned: ..... '* Date: 10-12-2002 '* Author: Ahmad E. Ashparie '* ___________________________________________ '* Modification Log '* Date Author Description '* ------ -------- ------------- '* '******************************************************************* Private Function updateTBOps() As Boolean Dim UpdateResultset As rdoResultset Dim SQLstrUpdate As String Dim OperationIDU Dim Getdate Dim UPdateDone As Long DateOfoperation = Trim(cmbOperationDate.Text) If DateOfoperation = "" Then Exit Function End If OperationIDU = Trim(Getdate) ProgressBar1.Visible = True ProgressBar1.Value = 10 Screen.MousePointer = vbHourglass SQLstrUpdate = "update andrs_db_operation " & _ "set DD_comments= " & (Trim(InQuotes(RemoveInvldChr(rchComments.Text)))) & _ ", DD_drains= " & (Trim(InQuotes(RemoveInvldChr(txtDrains.Text)))) & _ ", DD_prosthetic= " & (Trim(InQuotes(RemoveInvldChr(txtProsthetic.Text)))) & _ ", DD_complications= " & (Trim(InQuotes(RemoveInvldChr(txtComplications.Text)))) & _ ", DD_preop_dx= " & (Trim(InQuotes(RemoveInvldChr(txtPreOpDx.Text)))) & _ ", DD_post_op_dx= " & (Trim(InQuotes(RemoveInvldChr(txtPostOpDx.Text)))) & _ " where operation_id= " & (Trim(OperationIDU)) Set UpdateResultset = myDB.OpenResultset _ (SQLstrUpdate, rdOpenForwardOnly, rdConcurReadOnly) UPdateDone = myDB.RowsAffected If UPdateDone > 0 Then UpdateResultset.Close Set UpdateResultset = Nothing updateDrains = True ProgressBar1.Value = 100 Screen.MousePointer = vbNormal StatusBar1.Panels(1).Text = "Completed ..." Exit Function Else UpdateResultset.Close Set UpdateResultset = Nothing ProgressBar1.Visible = False Screen.MousePointer = vbNormal StatusBar1.Panels(1).Text = "Error ..." Exit Function End If End Function
-
HOME
|
ABOUT
|
CONTACT US
Copyright © 2009 ASP-VBCode