DB_Read1Row (DB_Read1stRow)

Reads from a table in a DB
Reads only the first row, and return a string containing the full row separated by custom character

CodeFunctionName
What is this?

Public

Tested

Original Work
Function DB_Read1stRow(SQLQuery, Sepa)
    ' Returns 1st row from a query
    '
    If Sepa = "" Then Sepa = "|"
    Rett                 = ""
    If SQLQuery > "" Then
        Set recordsetF    = oConn.execute(SQLQuery)
        If Not recordsetF.eof Then
            For I = 1 to recordsetF.Fields.Count
                If Rett > "" Then Rett = Rett & Sepa
                Rett        = Rett & recordsetF(I-1)
            Next
        End If
    End If
    DB_Read1stRow        = Rett
End Function

SQLQuery, Sepa

Views 6,349

Downloads 1,576

CodeID
DB ID