Click here to Skip to main content
15,900,108 members
Home / Discussions / C#
   

C#

 
GeneralRe: Query Pin
com.neeraj20-Mar-07 23:21
com.neeraj20-Mar-07 23:21 
QuestionArt network with C# Pin
pariisa20-Mar-07 22:21
pariisa20-Mar-07 22:21 
AnswerRe: Art network with C# Pin
V.20-Mar-07 22:39
professionalV.20-Mar-07 22:39 
AnswerRe: Art network with C# Pin
PlayByTheRules20-Mar-07 23:46
PlayByTheRules20-Mar-07 23:46 
GeneralRe: Art network with C# Pin
Pete O'Hanlon20-Mar-07 23:50
mvePete O'Hanlon20-Mar-07 23:50 
GeneralRe: Art network with C# Pin
Russell Jones21-Mar-07 1:12
Russell Jones21-Mar-07 1:12 
GeneralRe: Art network with C# Pin
Pete O'Hanlon21-Mar-07 2:22
mvePete O'Hanlon21-Mar-07 2:22 
GeneralRe: Art network with C# Pin
Colin Angus Mackay21-Mar-07 4:52
Colin Angus Mackay21-Mar-07 4:52 
QuestionHaving issues with Object comparison [modified] Pin
myNameIsRon20-Mar-07 20:59
myNameIsRon20-Mar-07 20:59 
AnswerRe: Having issues with Object comparison Pin
joon vh.20-Mar-07 22:09
joon vh.20-Mar-07 22:09 
GeneralRe: Having issues with Object comparison Pin
myNameIsRon21-Mar-07 5:05
myNameIsRon21-Mar-07 5:05 
GeneralRe: Having issues with Object comparison Pin
joon vh.21-Mar-07 5:23
joon vh.21-Mar-07 5:23 
GeneralRe: Having issues with Object comparison Pin
myNameIsRon21-Mar-07 5:40
myNameIsRon21-Mar-07 5:40 
GeneralRe: Having issues with Object comparison Pin
joon vh.21-Mar-07 5:46
joon vh.21-Mar-07 5:46 
GeneralRe: Having issues with Object comparison Pin
myNameIsRon21-Mar-07 16:50
myNameIsRon21-Mar-07 16:50 
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 

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.