Click here to Skip to main content
15,924,828 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need help to design game Pin
Pete O'Hanlon14-May-07 22:46
mvePete O'Hanlon14-May-07 22:46 
GeneralRe: Need help to design game Pin
haroon198014-May-07 23:26
haroon198014-May-07 23:26 
AnswerRe: Need help to design game Pin
J4amieC15-May-07 0:00
J4amieC15-May-07 0:00 
GeneralRe: Need help to design game Pin
haroon198015-May-07 0:17
haroon198015-May-07 0:17 
QuestionBook recommendations Pin
Eduard Keilholz14-May-07 21:52
Eduard Keilholz14-May-07 21:52 
Questionextract email ids from WAB Pin
jazeelkm14-May-07 21:08
jazeelkm14-May-07 21:08 
QuestionNT Service, Assembly Security, Permissions Pin
realmontanakid14-May-07 21:07
realmontanakid14-May-07 21:07 
QuestionC# .net help Pin
vijay_8314-May-07 20:39
vijay_8314-May-07 20:39 
Hi,

I have a C#.net application in which i have read the datas from excel sheet and displayed in a datagrid in my Aspx form.

The code is here

private void Button2_Click(object sender, System.EventArgs e)
{

try
{
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Salary.xls;Extended Properties=""Excel 8.0;HDR=YES;""";
OleDbConnection conn = new OleDbConnection(strConnection);
//conn.Open();
OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet1$]", conn);
// command.Connection = conn;
// command.CommandType = CommandType.Text;
// command.CommandText = "SELECT * FROM [Sheet1]";
OleDbDataAdapter da = new OleDbDataAdapter(command);
DataSet ds = new DataSet();
//DataTable dt = new DataTable();
conn.Open();
da.Fill(ds, "EmpSal");
DataGrid1.DataSource=ds;
DataGrid1.DataBind();
//da.Fill(dt);
conn.Close();
lblError.Text="The Excel sheet has been read";

//return dt;
}
catch (Exception ex)
{
Response.Write( ex.Message);
//return null;
}


}

the thing is that i have to upload the datas into the mysql database table. can anybody pls help me with the C#.net code. i need to use only mysql database.(coz we r using mysql db in our project)

Regards
Vijay.Smile | :)

QuestionConvert numeric values into words Pin
.NET- India 14-May-07 20:36
.NET- India 14-May-07 20:36 
AnswerRe: Convert numeric values into words Pin
PSK_14-May-07 20:44
PSK_14-May-07 20:44 
QuestionCross-thread operation not valid: Control "PerspectiveWindow" accessed from a thread other than the thread it was created on. Pin
Kapil Singhal14-May-07 20:30
Kapil Singhal14-May-07 20:30 
AnswerRe: Cross-thread operation not valid: Control "PerspectiveWindow" accessed from a thread other than the thread it was created on. Pin
Martin#14-May-07 20:38
Martin#14-May-07 20:38 
AnswerRe: Cross-thread operation not valid: Control "PerspectiveWindow" accessed from a thread other than the thread it was created on. Pin
Stefan Troschuetz14-May-07 21:12
Stefan Troschuetz14-May-07 21:12 
AnswerRe: Cross-thread operation not valid: Control "PerspectiveWindow" accessed from a thread other than the thread it was created on. Pin
Nouman Bhatti15-May-07 2:05
Nouman Bhatti15-May-07 2:05 
Questionhow to disable movement of browser movement Pin
fgfdhghgfd14-May-07 20:23
fgfdhghgfd14-May-07 20:23 
AnswerRe: how to disable movement of browser movement Pin
Guffa14-May-07 21:33
Guffa14-May-07 21:33 
Question'Interop.SQLDMO' Problem Pin
rsgdba14-May-07 20:09
rsgdba14-May-07 20:09 
QuestionAdding member variables to a class at Runtime.. Pin
nasambur14-May-07 20:04
nasambur14-May-07 20:04 
AnswerRe: Adding member variables to a class at Runtime.. Pin
S. Senthil Kumar14-May-07 20:14
S. Senthil Kumar14-May-07 20:14 
AnswerRe: Adding member variables to a class at Runtime.. Pin
Guffa14-May-07 20:17
Guffa14-May-07 20:17 
GeneralRe: Adding member variables to a class at Runtime.. Pin
Blumen14-May-07 21:16
Blumen14-May-07 21:16 
AnswerRe: Adding member variables to a class at Runtime.. Pin
Guffa14-May-07 21:37
Guffa14-May-07 21:37 
AnswerRe: Adding member variables to a class at Runtime.. Pin
Giorgi Dalakishvili15-May-07 4:20
mentorGiorgi Dalakishvili15-May-07 4:20 
Questionextract email id from a text file Pin
jazeelkm14-May-07 20:02
jazeelkm14-May-07 20:02 
AnswerRe: extract email id from a text file Pin
PSK_14-May-07 20:41
PSK_14-May-07 20:41 

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.