Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to add a file list box in SHBrowseOfFolder() dialog? Pin
zhongwenjia11-May-07 23:28
zhongwenjia11-May-07 23:28 
AnswerRe: How to add a file list box in SHBrowseOfFolder() dialog? Pin
Mark Salsbery12-May-07 5:35
Mark Salsbery12-May-07 5:35 
QuestionIP address control Pin
prathuraj11-May-07 20:39
prathuraj11-May-07 20:39 
AnswerRe: IP address control Pin
TariqZ11-May-07 21:20
TariqZ11-May-07 21:20 
GeneralRe: IP address control Pin
Member 1308982521-Apr-17 0:21
Member 1308982521-Apr-17 0:21 
QuestionLow-level(byte-level) Duplicating Pin
Fouad_kayali11-May-07 20:09
Fouad_kayali11-May-07 20:09 
AnswerRe: Low-level(byte-level) Duplicating Pin
TariqZ11-May-07 21:24
TariqZ11-May-07 21:24 
Questioninsert excel datas in mysql db Pin
vijay_8311-May-07 19:33
vijay_8311-May-07 19:33 
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 | :)

AnswerRe: insert excel datas in mysql db Pin
Rajesh R Subramanian12-May-07 0:22
professionalRajesh R Subramanian12-May-07 0:22 
GeneralRe: insert excel datas in mysql db Pin
vijay_8312-May-07 1:56
vijay_8312-May-07 1:56 
QuestionCreateProcess and WaitForSingleObject Pin
cppshishu11-May-07 18:57
cppshishu11-May-07 18:57 
AnswerRe: CreateProcess and WaitForSingleObject Pin
Mark Salsbery12-May-07 5:43
Mark Salsbery12-May-07 5:43 
QuestionStorage class for MD5 values Pin
TariqZ11-May-07 18:39
TariqZ11-May-07 18:39 
AnswerRe: Storage class for MD5 values Pin
Garth J Lancaster11-May-07 19:27
professionalGarth J Lancaster11-May-07 19:27 
QuestionSecond Slider won't slide with setcapture Pin
mtwombley11-May-07 13:05
mtwombley11-May-07 13:05 
AnswerRe: Second Slider won't slide with setcapture Pin
Mark Salsbery11-May-07 13:25
Mark Salsbery11-May-07 13:25 
GeneralRe: Second Slider won't slide with setcapture Pin
mtwombley11-May-07 13:57
mtwombley11-May-07 13:57 
GeneralRe: Second Slider won't slide with setcapture Pin
Mark Salsbery11-May-07 14:39
Mark Salsbery11-May-07 14:39 
GeneralRe: Second Slider won't slide with setcapture Pin
mtwombley11-May-07 15:24
mtwombley11-May-07 15:24 
GeneralRe: Second Slider won't slide with setcapture Pin
Mark Salsbery11-May-07 16:01
Mark Salsbery11-May-07 16:01 
GeneralRe: Second Slider won't slide with setcapture Pin
mtwombley12-May-07 10:18
mtwombley12-May-07 10:18 
GeneralRe: Second Slider won't slide with setcapture Pin
Mark Salsbery12-May-07 14:05
Mark Salsbery12-May-07 14:05 
QuestionLogonUser to windows xp Pin
jluis_hdezg11-May-07 10:15
jluis_hdezg11-May-07 10:15 
QuestionHow to obtain a DLL window handle Pin
Perspx11-May-07 10:05
Perspx11-May-07 10:05 
AnswerRe: How to obtain a DLL window handle Pin
Randor 11-May-07 10:54
professional Randor 11-May-07 10:54 

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.