Click here to Skip to main content
15,890,282 members
Home / Discussions / C#
   

C#

 
GeneralRe: Having issues with Object comparison Pin
myNameIsRon21-Mar-07 18:55
myNameIsRon21-Mar-07 18:55 
AnswerRe: Having issues with Object comparison Pin
Pete O'Hanlon20-Mar-07 23:29
mvePete O'Hanlon20-Mar-07 23:29 
GeneralRe: Having issues with Object comparison Pin
myNameIsRon21-Mar-07 4:52
myNameIsRon21-Mar-07 4:52 
QuestionCalling a method without object or its class name.. Pin
nasambur20-Mar-07 20:40
nasambur20-Mar-07 20:40 
AnswerRe: Calling a method without object or its class name.. Pin
Martin#20-Mar-07 21:25
Martin#20-Mar-07 21:25 
GeneralRe: Calling a method without object or its class name.. Pin
joon vh.20-Mar-07 22:13
joon vh.20-Mar-07 22:13 
AnswerRe: Calling a method without object or its class name.. Pin
Russell Jones21-Mar-07 1:14
Russell Jones21-Mar-07 1:14 
QuestionSQL: getting and storing data Pin
Glen Harvy20-Mar-07 20:29
Glen Harvy20-Mar-07 20:29 
Hi,

Best way is to show you what I want:

SQL Database:

SqlConnection connection = new SqlConnection(connectionString);<br />
SqlCommand getTableList = connection.CreateCommand();<br />
string command = "Select name from sysobjects where type = 'U'";<br />
getTableList.CommandText = command;<br />
connection.Open();<br />
string tables = getTableList.ExecuteScalar().ToString();<br />
connection.Close();<br />
MessageBox.Show("We got ..\n" + tables);


How do I store the results of the SQL Command?

The command appears to work OK but only the name of the first table is recorded in "tables".

Ideally I would like to put the results of the SQL command into an array.

TIA.


Glen Harvy

AnswerRe: SQL: getting and storing data Pin
KaineDunno20-Mar-07 21:57
KaineDunno20-Mar-07 21:57 
GeneralRe: SQL: getting and storing data Pin
Keshav V. Kamat21-Mar-07 0:49
Keshav V. Kamat21-Mar-07 0:49 
GeneralRe: SQL: getting and storing data Pin
Glen Harvy21-Mar-07 1:32
Glen Harvy21-Mar-07 1:32 
QuestionQuestion about C++ and C# ... Pin
Yanshof20-Mar-07 20:23
Yanshof20-Mar-07 20:23 
AnswerRe: Question about C++ and C# ... Pin
WillemM20-Mar-07 22:04
WillemM20-Mar-07 22:04 
Questioncrystal report calling [modified] Pin
virendra patel20-Mar-07 20:11
virendra patel20-Mar-07 20:11 
AnswerRe: crystal report calling Pin
virendra patel20-Mar-07 20:15
virendra patel20-Mar-07 20:15 
Questionusing .Net dll in deployment custom actions Pin
William Ten Broek20-Mar-07 20:10
William Ten Broek20-Mar-07 20:10 
QuestionCan not read Environment variables on HttpRequest Pin
Ranjit1620-Mar-07 19:29
Ranjit1620-Mar-07 19:29 
QuestionCapture the computer screen and save as a bit map file in c# Pin
rangaSL20-Mar-07 19:28
rangaSL20-Mar-07 19:28 
AnswerRe: Capture the computer screen and save as a bit map file in c# Pin
Martin#20-Mar-07 20:14
Martin#20-Mar-07 20:14 
GeneralRe: Capture the computer screen and save as a bit map file in c# Pin
rangaSL20-Mar-07 21:09
rangaSL20-Mar-07 21:09 
QuestionDatagrid view Pin
hiremath7120-Mar-07 19:22
hiremath7120-Mar-07 19:22 
AnswerRe: Datagrid view Pin
joon vh.20-Mar-07 22:23
joon vh.20-Mar-07 22:23 
GeneralRe: Datagrid view Pin
hiremath7121-Mar-07 0:21
hiremath7121-Mar-07 0:21 
GeneralRe: Datagrid view Pin
joon vh.21-Mar-07 0:45
joon vh.21-Mar-07 0:45 
QuestionApplication hanging Pin
SakthiSurya20-Mar-07 18:35
SakthiSurya20-Mar-07 18:35 

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.