<!--#Include File="db_function.asp"-->
Function getdb(fieldstr,comstr,fileNamet) '//getdb(資料庫欄位名稱(陣列型態),SQL命令,資料庫檔案位置)
ReDim createUsers(0) : rlcnt = 0
getF1Ary = fieldstr
Set conn=GetMdbConnection(fileNamet) '//搭配db_function 使用
Set rs1=GetSQLServerStaticRecordset(conn,comstr) '//搭配db_function 使用
dbcheck=false
IF NOT rs1.EOF THEN
FOR a1 = 1 TO rs1.RecordCount
getSte = ""
FOR gf1 = 0 TO Ubound(getF1Ary)
getOne = getF1Ary(gf1)
IF getSte="" THEN
getSte = rs1(getOne)
ELSE
getSte = getSte & "<.>" & rs1(getOne)
END IF
NEXT
IF createUsers(rlcnt)<>"" THEN
rlcnt = rlcnt + 1
ReDim Preserve createUsers(rlcnt)
END IF
createUsers(rlcnt) = getSte
rs1.Movenext
NEXT
else
dbcheck=true
END IF
rs1.close()
set rs1=nothing
getdb=createUsers
End Function