Click here to Skip to main content
15,913,910 members
Home / Discussions / C#
   

C#

 
Questioninternal/internal proected Pin
amaneet30-Mar-07 22:49
amaneet30-Mar-07 22:49 
AnswerRe: internal/internal proected Pin
Colin Angus Mackay30-Mar-07 23:09
Colin Angus Mackay30-Mar-07 23:09 
GeneralRe: internal/internal proected Pin
Vega0231-Mar-07 6:35
Vega0231-Mar-07 6:35 
GeneralRe: internal/internal proected Pin
Colin Angus Mackay31-Mar-07 7:14
Colin Angus Mackay31-Mar-07 7:14 
QuestionHow to open form on tree node click Pin
EEmaan30-Mar-07 21:54
EEmaan30-Mar-07 21:54 
AnswerRe: How to open form on tree node click Pin
giddy_guitarist31-Mar-07 5:49
giddy_guitarist31-Mar-07 5:49 
QuestionUploading Excel sheet data into SQl problem Pin
S.Rajeshwar30-Mar-07 19:15
S.Rajeshwar30-Mar-07 19:15 
AnswerRe: Uploading Excel sheet data into SQl problem Pin
sujithkumarsl30-Mar-07 19:30
sujithkumarsl30-Mar-07 19:30 
Try out this......................
// Connection String.
String connString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + FilePath + ";Extended Properties=Excel 8.0;";
// Create connection object by using the preceding connection string.
con = new OleDbConnection(connString);
// Open connection with the database.
con.Open();
// Get the data table containg the schema guid.
dt = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if(dt == null)
{
return null;
}
string[] excelSheets = new String[dt.Rows.Count];
int i = 0;
// Add the sheet name to the string array.
foreach(DataRow row in dt.Rows)
{
excelSheets[i] = row["TABLE_NAME"].ToString();
i++;
if(i==sheetNumber)
break;
}
OleDbCommand excelCommand = new OleDbCommand("Select * from ["+excelSheets[sheetNumber-1]+"]",con);
OleDbDataAdapter excelAdapter = new OleDbDataAdapter(excelCommand);
System.Data.DataTable importStudentsDT = new System.Data.DataTable();
excelAdapter.Fill(importStudentsDT);
return importStudentsDT;

My small attempt...

QuestionHow to find the Current Path, in Windows Application Pin
pashitech30-Mar-07 18:32
pashitech30-Mar-07 18:32 
AnswerRe: How to find the Current Path, in Windows Application Pin
Muammar©30-Mar-07 19:53
Muammar©30-Mar-07 19:53 
AnswerRe: How to find the Current Path, in Windows Application Pin
Stefan Troschuetz30-Mar-07 21:26
Stefan Troschuetz30-Mar-07 21:26 
GeneralRe: How to find the Current Path, in Windows Application Pin
Wayne Phipps31-Mar-07 0:25
Wayne Phipps31-Mar-07 0:25 
AnswerRe: How to find the Current Path, in Windows Application Pin
Noman Aftab31-Mar-07 0:41
Noman Aftab31-Mar-07 0:41 
GeneralRe: How to find the Current Path, in Windows Application Pin
Wayne Phipps31-Mar-07 1:14
Wayne Phipps31-Mar-07 1:14 
Question"Attempted to read or write protected memory." Pin
User 137680030-Mar-07 14:26
User 137680030-Mar-07 14:26 
AnswerRe: "Attempted to read or write protected memory." Pin
Dewald31-Mar-07 0:03
Dewald31-Mar-07 0:03 
GeneralRe: "Attempted to read or write protected memory." Pin
User 137680031-Mar-07 5:55
User 137680031-Mar-07 5:55 
QuestionUser control without being in the GAC Pin
Esmo200030-Mar-07 12:36
Esmo200030-Mar-07 12:36 
AnswerRe: User control without being in the GAC Pin
J$30-Mar-07 13:32
J$30-Mar-07 13:32 
Questionhow to invisible a row of Datagridview ? Pin
hdv21230-Mar-07 11:27
hdv21230-Mar-07 11:27 
Questionhow can I get the lighter tone of color Pin
samreengr830-Mar-07 11:24
samreengr830-Mar-07 11:24 
AnswerRe: how can I get the lighter tone of color Pin
led mike30-Mar-07 12:00
led mike30-Mar-07 12:00 
AnswerRe: how can I get the lighter tone of color Pin
Kitchen_31-Mar-07 2:21
Kitchen_31-Mar-07 2:21 
AnswerRe: how can I get the lighter tone of color Pin
Thomas Stockwell1-Apr-07 4:36
professionalThomas Stockwell1-Apr-07 4:36 
QuestionMoving DataRows from one DataTable to another Pin
Pualee30-Mar-07 10:48
Pualee30-Mar-07 10:48 

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.