Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is .net the future? Pin
J4amieC9-Aug-07 23:14
J4amieC9-Aug-07 23:14 
AnswerRe: Is .net the future? Pin
mav.northwind10-Aug-07 1:18
mav.northwind10-Aug-07 1:18 
GeneralRe: Is .net the future? Pin
Harkamal Singh12-Aug-07 6:45
Harkamal Singh12-Aug-07 6:45 
QuestionHow to store the retrieved values from a coulmn of a table in an array?? Pin
rameshbhojan9-Aug-07 21:41
rameshbhojan9-Aug-07 21:41 
AnswerRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Talal Sultan9-Aug-07 21:55
Talal Sultan9-Aug-07 21:55 
GeneralRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Giorgi Dalakishvili9-Aug-07 22:03
mentorGiorgi Dalakishvili9-Aug-07 22:03 
GeneralRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
rameshbhojan10-Aug-07 0:42
rameshbhojan10-Aug-07 0:42 
AnswerRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Talal Sultan10-Aug-07 2:10
Talal Sultan10-Aug-07 2:10 
Like I said in my second post here http://www.codeproject.com/script/comments/forums.asp?msg=2176578&forumid=1649#xx2176578xx[^], you need to replace the data table stuff with the array stuff. Since you only return one column from the database, you would only need column 0 of the data reader:

ArrayList myList = new ArrayList();
SqlDataReader dr = myCommand.ExecuteReader();
while (dr.Read()) // reads as long as there are values 
    myList.Add(dr.GetString(0)); // to get the Name column  
dr.Close();


If your method has an Array parameter, you can convert ArrayList into Array as follows:

Array myArray = myList.ToArray();



-- If this is a post that has been helpful to you, please vote for it. Thank you!

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook

GeneralRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
rameshbhojan19-Aug-07 22:58
rameshbhojan19-Aug-07 22:58 
GeneralRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Talal Sultan19-Aug-07 23:21
Talal Sultan19-Aug-07 23:21 
AnswerRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Giorgi Dalakishvili9-Aug-07 21:56
mentorGiorgi Dalakishvili9-Aug-07 21:56 
GeneralRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
rameshbhojan19-Aug-07 21:19
rameshbhojan19-Aug-07 21:19 
GeneralRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Giorgi Dalakishvili19-Aug-07 21:22
mentorGiorgi Dalakishvili19-Aug-07 21:22 
AnswerRe: How to store the retrieved values from a coulmn of a table in an array?? Pin
Talal Sultan9-Aug-07 21:57
Talal Sultan9-Aug-07 21:57 
Questionlistview in c# Pin
monuSaini9-Aug-07 21:34
monuSaini9-Aug-07 21:34 
AnswerRe: listview in c# Pin
mav.northwind10-Aug-07 12:31
mav.northwind10-Aug-07 12:31 
AnswerRe: What to choose asp.net!!1 Pin
Albu Marius9-Aug-07 21:33
Albu Marius9-Aug-07 21:33 
GeneralRe: What to choose asp.net!!1 Pin
monuSaini9-Aug-07 23:23
monuSaini9-Aug-07 23:23 
QuestionCapturing Complete Webpage as an Image Pin
Dinesh N Samarathunga9-Aug-07 20:29
Dinesh N Samarathunga9-Aug-07 20:29 
AnswerRe: Capturing Complete Webpage as an Image Pin
Michael Sync9-Aug-07 20:35
Michael Sync9-Aug-07 20:35 
GeneralRe: Capturing Complete Webpage as an Image Pin
Dinesh N Samarathunga9-Aug-07 22:31
Dinesh N Samarathunga9-Aug-07 22:31 
AnswerRe: Capturing Complete Webpage as an Image Pin
Jax_qqq9-Aug-07 21:18
Jax_qqq9-Aug-07 21:18 
GeneralRe: Capturing Complete Webpage as an Image Pin
Dinesh N Samarathunga9-Aug-07 22:46
Dinesh N Samarathunga9-Aug-07 22:46 
QuestionGet Raw Kerberos Token to Access Exchange 2007 by IMAP Pin
Stas9-Aug-07 19:52
Stas9-Aug-07 19:52 
Questionmove user to different tab and txt field Pin
Berdril9-Aug-07 18:33
Berdril9-Aug-07 18:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.