i have no background with arrays, so please treat me like an idiot.

what i am doing:

i have a task management system that can share a task between 1-50 different users.

whenever a user adds a note or takes themselves off the task, i would like for each user to get an email.

what i want to do with an array:
im guessing create a dynamic array

dim strArray() as string

moddata.databaseconnection("select email from system_users")
do until adors.eof = true
strarray() = adors.fields("email").value
adors.movenext
loop
databasedisconnect

dim i as integer = 0
do while i <= strarray() 'however i get the max count from the array'
emailfunction(email, message)
i% = i% + 1
loop

that is a rough example, but i hope you get the idea of what i am doing.

just dont know how to do it.

thanks

Close...

Dim MyString As String, MyStringArray() as String, ForLoopCounter As Integer
'...open rs etc..
Do While Not Rs.EOF
  MyString = MyString & ","
  Rs.MoveNext
Loop
MyStringArray = Split(MyString, ",")

For ForLoopCounter = 0 To UBound(MyStringArray)
  '....

Good Luck

thanks that helped out alot.
not sure why post got moved to vb6 forum though
i was programming in .net

only difference is the split function

Dim myStringArray() As String = strEmail$.Split(",")

everything else worked though thanks again.

Glad you got it solved... Next time though to keep your thread from being moved you should specify which version of .net you are using in your question...like

I'm using .net 2k2, 2k3, 2k5, 2k8, 2k10 and I...

If you get my meaning...

Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.