Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


vbscript help

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1461
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbscript help
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 vbscript help - 10/13/2004 1:27:37 AM   
  Dino Nguyen

 

Posts: 3
Score: 0
Joined: 10/13/2004
From:
Status: offline
i'm a newbie to vbscript
how do i convert this piece of codes to vbscript?

Private Type udtMbr
Dim MbrRID
Dim MbrID
End Type
Dim arrMbrList() As udtMbr
 
 
Post #: 1
 
 Re: vbscript help - 10/13/2004 6:43:39 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
What is it that this is supposed to do? What language is it from?

(in reply to Dino Nguyen)
 
 
Post #: 2
 
 Re: vbscript help - 10/13/2004 7:17:35 AM   
  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

(in reply to Dino Nguyen)
 
 
Post #: 3
 
 Re: vbscript help - 10/13/2004 9:07:20 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Unfortunately I don't know VB so can't help you.

(in reply to Dino Nguyen)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbscript help Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts