Best Practice data to int[]

  • Thread starter Thread starter Roger Webb
  • Start date Start date
R

Roger Webb

Hey Yall,

What do yall think is the bast practice way to take a set of keys returned
from a SQLServer DB and turn them into an int[]??

- Roger
 
i = cint(myDs.Tables(0).Rows(n).Items(x))

--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Retrieve keys using datatable, create array manually (you know how many keys
there are - rows.Count) and do a for loop to fill the array.
 
Whats a cint? Also, this will load the column into an array? How do you
define n and x?



William (Bill) Vaughn said:
i = cint(myDs.Tables(0).Rows(n).Items(x))

--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Roger Webb said:
Hey Yall,

What do yall think is the bast practice way to take a set of keys returned
from a SQLServer DB and turn them into an int[]??

- Roger
 
Cint is casting the object returned to an integer. N is simply the row index
(integer) and X is the Columns Item index (integer).

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Roger Webb said:
Whats a cint? Also, this will load the column into an array? How do you
define n and x?



William (Bill) Vaughn said:
i = cint(myDs.Tables(0).Rows(n).Items(x))

--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Roger Webb said:
Hey Yall,

What do yall think is the bast practice way to take a set of keys returned
from a SQLServer DB and turn them into an int[]??

- Roger
 
Back
Top