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


Public

Tested

My Own 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 5522 Downloads 1323

Classic ASP Database
ANmarAmdeen
747
Attachments
Revisions

v2.0