Link to home
Start Free TrialLog in
Avatar of Rias
RiasFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Delegate with parameter +vb.net 2.0

Hi,
Need to call this function with parameter with delegate.Any suggestions welcome

Cheers
Public Function RecordTable(ByVal Table As String, ByVal OutWhere As String) As Boolean
        '--------------------------------------------------------------------------------
        'Pre Conditions:
        'Table doing search on must contain the field refno
        'Parameters:
        'Table: Name of table to use in search
        'Outwhere: WHERE  section of the sql statement
        'Post Condition:
        'If record found in table then return true
        'else return false
        'On error
        'Msg displayed and function exits
        '--------------------------------------------------------------------------------
        Dim SQL As String
        Dim RS As New Recordset
        Dim flgRecord As Boolean = False
        If OutWhere.Trim = String.Empty Then
            Exit Function
        End If

SQL = "SELECT REFNO FROM " & UCase(Table) & " WHERE ClientCode = " & GetSQLValue(ClientCode, 4) & " And " &                            OutWhere

        RS = OpenRs(SQL)

        If RS.EOF = False Then flgRecord = True
        RS.Close()
        Return flgRecord    
       

ErrorHandler:
        AddMessage(FormatMessage(18, "RecordInTable " & OutWhere, Err.Description))
 End Function  '

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Deathrace
Deathrace
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial