Public Function ExecuteSQL(PsSql As String) As Boolean
    
    Dim lErrCode As Long                
    Dim sMessage As String                 
    
    Dim sExeSql As String                 
    
    On Error GoTo ErrorHandler             
    sExeSql = PsSql
    modbObject.LastServerErrReset  
    modbObject.ExecuteSQL (sExeSql)
   
    ExecuteSQL = RESULT_BOOL_OK
    
ErrorHandler:
    
    Exit Function
    
End Function================================================================ok?

解决方案 »

  1.   

    Public Function ParamAddValue(PsVname As String, PlVtype As Long, _
                                  PlOraType As Long, PvVvalue As Variant) As Long
        
        Dim lErrCode As Long
        Dim sMessage As String
        
        Dim vValue As Variant
        
        On Error GoTo ErrorHandler
         modbObject.Parameters.Add PsVname, 0, PlVtype
        modbObject.Parameters(PsVname).ServerType = PlOraType
        
      
        vValue = PvVvalue
        
     
        If (vValue = vbNullString) Then
            If (PlOraType <> ORATYPE_NUMBER) Then
                vValue = " "
            Else
                vValue = 0
            End If
        End If
         modbObject.Parameters(PsVname).Value = vValue
        
     
        ParamAddValue = RESULT_NORMAL
        
    ExitProcedure:
        
        Exit Function
        
    ErrorHandler:
        
         
    End Function Public Function ParamRemove(PsVname As String) As Long
        
        Dim lErrCode As Long
        Dim sMessage As String
        
        On Error GoTo ErrorHandler
         modbObject.Parameters.Remove PsVname
        
     
        ParamRemove = RESULT_NORMAL
        
    ExitProcedure:
        
        Exit Function
        
    ErrorHandler:
     
        
    End Function================================================================ok?
      

  2.   


    to wxyq2000(wxyq) :
      以上函数如何使用呢?
      我想将SQL所得结果显示在richtextbox里,应如果做?
      

  3.   

    to cacoda(睚眦必报) 我要存成一个文档。