Click here to Skip to main content
15,914,246 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to set the desktop wallpaper Pin
Rob Graham19-Jan-07 16:24
Rob Graham19-Jan-07 16:24 
GeneralRe: How to set the desktop wallpaper Pin
Ed.Poore19-Jan-07 23:30
Ed.Poore19-Jan-07 23:30 
GeneralRe: How to set the desktop wallpaper Pin
CodeItWell20-Jan-07 0:04
CodeItWell20-Jan-07 0:04 
GeneralRe: How to set the desktop wallpaper Pin
Ed.Poore20-Jan-07 0:09
Ed.Poore20-Jan-07 0:09 
QuestionFile Name Pin
-Yoyosh-19-Jan-07 10:30
-Yoyosh-19-Jan-07 10:30 
AnswerRe: File Name Pin
Mircea Puiu19-Jan-07 23:05
Mircea Puiu19-Jan-07 23:05 
GeneralRe: File Name Pin
-Yoyosh-20-Jan-07 8:13
-Yoyosh-20-Jan-07 8:13 
QuestionGetting TableName only from Northwind Database.......... Can someone help... Pin
nature027619-Jan-07 10:13
nature027619-Jan-07 10:13 
Hi,

I have a simple problem. All I need is a simple program that provides only tableName from Northwind Database.

What SQL Query should I write.

In the following code, I need to provide tableName (so that I can get DataSet object. I need to get a new tableName from
Northwind database at every iteration and pass the tableName to this method.

I need help.......



/****************************************/
private DataSet ReturnDataSet(tableName)
{
DataSet dataSet = null;
string sqlStatement = "select * from " + tableName;

try
{
using (SqlConnection sqlConnection = new SqlConnection(connectionInfo))
using (SqlCommand sqlCommand = new SqlCommand(sqlStatement, sqlConnection))
{
SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
dataSet = new DataSet();
sqlDataAdapter.Fill(dataSet, tableName);

}

}
catch
{
//Log the exception.
}
return dataSet;

}//End ReturnDataSet


Sanjeev


Sanjeev
AnswerRe: Getting TableName only from Northwind Database.......... Can someone help... Pin
Pete O'Hanlon19-Jan-07 10:22
mvePete O'Hanlon19-Jan-07 10:22 
GeneralRe: Getting TableName only from Northwind Database.......... Can someone help... Pin
nature027619-Jan-07 10:37
nature027619-Jan-07 10:37 
GeneralRe: Getting TableName only from Northwind Database.......... Can someone help... Pin
Pete O'Hanlon20-Jan-07 8:09
mvePete O'Hanlon20-Jan-07 8:09 
QuestionWebService to WebService Communication [modified] Pin
DeepToot19-Jan-07 9:45
DeepToot19-Jan-07 9:45 
Questiontry to add new record with bindingsource component Pin
ABBASI_RA19-Jan-07 9:19
ABBASI_RA19-Jan-07 9:19 
AnswerRe: try to add new record with bindingsource component Pin
Christian Graus19-Jan-07 9:53
protectorChristian Graus19-Jan-07 9:53 
GeneralRe: try to add new record with bindingsource component Pin
ABBASI_RA19-Jan-07 10:03
ABBASI_RA19-Jan-07 10:03 
GeneralRe: try to add new record with bindingsource component Pin
Christian Graus19-Jan-07 11:59
protectorChristian Graus19-Jan-07 11:59 
QuestionArray question! Pin
C++NewBe19-Jan-07 8:51
C++NewBe19-Jan-07 8:51 
AnswerRe: Array question! Pin
Guffa19-Jan-07 8:56
Guffa19-Jan-07 8:56 
GeneralRe: Array question! Pin
C++NewBe19-Jan-07 8:59
C++NewBe19-Jan-07 8:59 
AnswerRe: Array question! Pin
Martin#19-Jan-07 9:07
Martin#19-Jan-07 9:07 
GeneralRe: Array question! Pin
C++NewBe19-Jan-07 9:13
C++NewBe19-Jan-07 9:13 
AnswerRe: Array question! Pin
Guffa19-Jan-07 9:53
Guffa19-Jan-07 9:53 
GeneralRe: Array question! Pin
Ed.Poore19-Jan-07 12:38
Ed.Poore19-Jan-07 12:38 
AnswerRe: Array question! Pin
David Domingues22-Jan-07 5:31
David Domingues22-Jan-07 5:31 
QuestionArray.getLength() vs Array.getUpperBound() Pin
C++NewBe19-Jan-07 8:08
C++NewBe19-Jan-07 8:08 

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.