DB_AllRows

Returns all rows found from an SQL Query as string
Separated by row and column separators (Sepa2 and Sepa1 respectively)

<%
Function DB_AllRows(SQLSt, Sepa1, Sepa2)
 If Sepa1="" Then Sepa1=Default_Sepa1
 If Sepa2="" Then Sepa2=Default_Sepa2
 DB_AllRows=String(3,String(2,Sepa))
 set recordsetF=connection.execute(SQLSt)
 if recordsetF.eof then exit function
 GGe=""
 Do Until recordsetF.eof
  IF GGe>"" Then GGe=GGe & Sepa2
  for each ff in recordsetf.fields
   GGe=GGe & trim(ff.value) & Sepa1
  next
  recordsetf.MoveNext
 Loop
 DB_AllRows=GGe
End Function
%>

SQLSt, Sepa1, Sepa2

Views 934 Downloads 343

'DB', 'Database', 'String', 'row', 'column', 'DB_ReadAllRows', 'DB_1stRow', 'DB_Read1stRow'

ANmarAmdeen
333
Database Classic ASP
Revisions

v2.0