Solved

Vb.net array

Posted on 2014-03-10
2
392 Views
Last Modified: 2014-03-10
I need declare an array something like this:
Dim arrayV() As String = {"Monitor", "DC Adapter", "Bag","Option1","Option2"}

But would like to store the contents of array in database field and then go get your content:

Database field content: "Monitor", "DC Adapter", "Bag","Option1","Option2"

And would get the contents of the field containing the array:

Dim ArrayV() as string={Database field content}

How can do
0
Comment
Question by:rflorencio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 400 total points
ID: 39917300
Assuming you are storing your values in a delimited format, you just need to use String.Split("<your delimiter>") to pull the values into an array:
'// Database access code

...

Dim arr() As String = SomeDataReader.GetString(0).Split("<your_delimiter>")

...

Open in new window

0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
ID: 39917309
just a note:
"Monitor", "DC Adapter", "Bag","Option1","Option2"

from the db should then be without all the quotes:
Monitor,DC Adapter,Bag,Option1,Option2
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question