| |
Dino Nguyen
Posts: 3
Score: 0
Joined: 10/13/2004
From:
Status: offline
|
it's in vb. i'm trying to convert it to vbscript here is the whole code Private Type udtMbr MbrRID As Long MbrID As String End Type Dim arrMbrList() As udtMbr Private Function GetDelegationList(strMemberID, lngMemberRecID) As String Dim rs As ADODB.Recordset Dim strList As String Dim strSQL As String Dim i As Integer On Error GoTo errGetDelegationList ReDim arrMbrList(0) arrMbrList(0).MbrRID = lngMemberRecID arrMbrList(0).MbrID = strMemberID i = 0 Do While i <= UBound(arrMbrList) strSQL = "select a.member_recid, a.member_id from member a, member_delegation b " _ & " where a.member_recid = b.member_recid and b.to_member_recid = " & arrMbrList(i).MbrRID _ & " and delegation_type = 'a'" _ & " and '" & Date & "' between date_start and date_end" Set rs = objFOS.GetRecordset(strSQL) Do While Not rs.EOF ReDim Preserve arrMbrList(UBound(arrMbrList) + 1) arrMbrList(UBound(arrMbrList)).MbrRID = rs("member_recid") arrMbrList(UBound(arrMbrList)).MbrID = rs("member_id") rs.MoveNext Loop i = i + 1 Loop strList = "" For i = 0 To UBound(arrMbrList) strList = strList & "'" & arrMbrList(i).MbrID & "', " Next strList = Left$(strList, Len(strList) - 2) ReDim arrMbrList(0) GetDelegationList = strList Exit Function errGetDelegationList: Err.Raise 999, "PassThrough", "Pass-through formatting Error." End Function
|
|