Click here to Skip to main content
16,006,594 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiontreeview control Pin
jabbarsb12-May-07 4:45
jabbarsb12-May-07 4:45 
QuestionRow_Updating not updating old value with new value Pin
aransiola12-May-07 1:28
aransiola12-May-07 1:28 
QuestionRow_Databound Event Pin
aransiola12-May-07 1:25
aransiola12-May-07 1:25 
QuestionFor session problem (ASP.NET 2.0) Pin
Darshan_shah12-May-07 0:30
Darshan_shah12-May-07 0:30 
AnswerRe: For session problem (ASP.NET 2.0) Pin
kubben13-May-07 2:47
kubben13-May-07 2:47 
QuestionUrgent help pls pls for asp.net 2.0 Pin
Darshan_shah12-May-07 0:25
Darshan_shah12-May-07 0:25 
AnswerRe: Urgent help pls pls for asp.net 2.0 Pin
Sandeep Kumar13-May-07 20:12
Sandeep Kumar13-May-07 20:12 
Questioninsert excel datas in mysql db Pin
vijay_8311-May-07 23:29
vijay_8311-May-07 23:29 
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 | :)

QuestionBetter Reporting Tool Pin
amargujrathi200611-May-07 23:07
amargujrathi200611-May-07 23:07 
Questiondownload images Pin
lakkudavanam11-May-07 22:53
lakkudavanam11-May-07 22:53 
AnswerRe: download images Pin
NetBot12-May-07 1:24
NetBot12-May-07 1:24 
QuestionHow to run web application Pin
Bajrang Singh11-May-07 22:40
Bajrang Singh11-May-07 22:40 
AnswerRe: How to run web application Pin
enjoycrack12-May-07 0:51
enjoycrack12-May-07 0:51 
QuestionPrint report with out prompt Pin
Suhail Shahab11-May-07 22:03
Suhail Shahab11-May-07 22:03 
AnswerRe: Print report with out prompt Pin
Fred_Smith11-May-07 22:16
Fred_Smith11-May-07 22:16 
QuestionASP:: runtime error '800a0046' --> Permission denied Pin
dhulipudi11-May-07 21:19
dhulipudi11-May-07 21:19 
AnswerRe: ASP:: runtime error '800a0046' --> Permission denied Pin
Fred_Smith11-May-07 21:26
Fred_Smith11-May-07 21:26 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
dhulipudi11-May-07 21:46
dhulipudi11-May-07 21:46 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
Fred_Smith11-May-07 21:58
Fred_Smith11-May-07 21:58 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
dhulipudi11-May-07 22:09
dhulipudi11-May-07 22:09 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
Fred_Smith11-May-07 22:12
Fred_Smith11-May-07 22:12 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied [modified] Pin
dhulipudi11-May-07 23:37
dhulipudi11-May-07 23:37 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
Fred_Smith11-May-07 23:47
Fred_Smith11-May-07 23:47 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
dhulipudi12-May-07 0:13
dhulipudi12-May-07 0:13 
GeneralRe: ASP:: runtime error '800a0046' --> Permission denied Pin
Fred_Smith12-May-07 0:35
Fred_Smith12-May-07 0: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.