troubleshooting Question

Storing Data from a Column in a Variable

Avatar of adoliv
adolivFlag for South Africa asked on
Web ApplicationsProgramming Languages-OtherMicrosoft Legacy OS
3 Comments1 Solution198 ViewsLast Modified:
Hi Experts

Okay I am creating a ZIP File containing multiple images files, but the filepaths that I require are results from a SQL Query that populate a Gridview.

Process Flow: User Provides A Start Date And End Date > Button 1 Click > SQL Query > Populate Gridview With Results > If User is happy with results > 2nd Button Click > Download ZIP File.

I need to know how I can store all the data in numerous records in one column of the Gridview into a String Variable(Please supply the example code required because I have searched the net for examples for a while and come out with nothing)

Example
Id      FileName      Extension
1      image1      jpg
2      image2      gif
3      image3      jpg

Basically I want to be able to store all the values under the FileName column in a String Variable called "items" (Please view attached Code Snippet or Attached File).
Line 3 = New String() {"", "c:\test\Copy of one.txt", "c:\test\one.txt", "c:\test\o-fone.txt"}

I think is needs to look like this
New String() {"", + items}
code.txt
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros