Split() function on single column result set? (VB.NET)

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi. I'm executing a DataReader and getting a single column resultset from a
SQL Database. I need to load each resultset's row into a string array
variable named CustomerNames(). Is it possible to do this? For example...

Dim CustomerNames() as string
CustomerNames = Split(mydatareader("columnname").tostring, ....)

Thanks!
 
Mike,

I should not know why not, however I like more this one (in the strongly
typed version of 2008).
\\\
Dim Customernames() = "123#345".ToString().Split("#"c)
///
or the same in version 2005
\\\
Dim Customernames() as String = "123#345".ToString().Split("#"c)
///

(actualy I used this today with an execute scalar)

Cor
 
Back
Top