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

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 3292 Downloads 853

'CutString3', 'DB', 'SQL', 'DB_Read1stRow', 'DB_AllRows', 'Database', 'DB_ReadAllRows', 'DB_1stRows'

ANmarAmdeen
551
Database Classic ASP
Revisions

v2.0