Click here to Skip to main content
15,845,330 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can a custom property get it's values form a database? Pin
maryam.saboor18-Feb-08 0:13
professionalmaryam.saboor18-Feb-08 0:13 
GeneralRe: How can a custom property get it's values form a database? Pin
Luc Pattyn18-Feb-08 2:13
sitebuilderLuc Pattyn18-Feb-08 2:13 
GeneralRe: How can a custom property get it's values form a database? Pin
maryam.saboor18-Feb-08 2:29
professionalmaryam.saboor18-Feb-08 2:29 
GeneralRe: How can a custom property get it's values form a database? Pin
Luc Pattyn18-Feb-08 2:39
sitebuilderLuc Pattyn18-Feb-08 2:39 
Generalprocess Pin
sobhaniir17-Feb-08 21:33
sobhaniir17-Feb-08 21:33 
GeneralRe: process Pin
Giorgi Dalakishvili17-Feb-08 21:56
mentorGiorgi Dalakishvili17-Feb-08 21:56 
GeneralRe: process Pin
sobhaniir18-Feb-08 2:56
sobhaniir18-Feb-08 2:56 
QuestionHow to select rows from Excel file with query? Pin
Noemi Katinka17-Feb-08 21:16
Noemi Katinka17-Feb-08 21:16 
Hi everybody!

I have an Excel file and i want to select from the file just some rows.
I can select the whole file in the following way:

private static DataTable GetDataFromXLS(string strFilePath)
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+strFilePath+"; Jet OLEDB:Engine Type=5;" + "Extended Properties=Excel 8.0;";

OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn);
DataSet myDataSet = new DataSet();

myCommand.Fill(myDataSet, "ExcelInfo");

DataTable dt = myDataSet.Tables[0];

return dt;
}

But i don't need the whole excel file just a few rows. How can i do this from the query?
It is possibile to do this with a query?

Thanks for your help!
QuestionHow to handle keypressevent Pin
dnyanubhamare17-Feb-08 20:17
dnyanubhamare17-Feb-08 20:17 
AnswerRe: How to handle keypressevent Pin
Christian Graus17-Feb-08 20:23
protectorChristian Graus17-Feb-08 20:23 
AnswerRe: How to handle keypressevent Pin
Ravenet17-Feb-08 20:53
Ravenet17-Feb-08 20:53 
GeneralRe: How to handle keypressevent Pin
Xmen Real 17-Feb-08 21:40
professional Xmen Real 17-Feb-08 21:40 
GeneralRe: How to handle keypressevent Pin
Christian Graus17-Feb-08 23:04
protectorChristian Graus17-Feb-08 23:04 
GeneralRe: How to handle keypressevent Pin
Xmen Real 17-Feb-08 23:39
professional Xmen Real 17-Feb-08 23:39 
GeneralRe: How to handle keypressevent Pin
Christian Graus17-Feb-08 23:03
protectorChristian Graus17-Feb-08 23:03 
GeneralRe: How to handle keypressevent Pin
Pete O'Hanlon18-Feb-08 0:01
subeditorPete O'Hanlon18-Feb-08 0:01 
GeneralRe: How to handle keypressevent Pin
Ravenet18-Feb-08 0:04
Ravenet18-Feb-08 0:04 
GeneralRe: How to handle keypressevent Pin
J4amieC18-Feb-08 1:31
J4amieC18-Feb-08 1:31 
GeneralRe: How to handle keypressevent Pin
Ravenet18-Feb-08 2:23
Ravenet18-Feb-08 2:23 
Questionhow to get no Pin
sugunavathy17-Feb-08 19:13
sugunavathy17-Feb-08 19:13 
AnswerRe: how to get no Pin
Christian Graus17-Feb-08 19:22
protectorChristian Graus17-Feb-08 19:22 
GeneralRe: how to get no Pin
sugunavathy17-Feb-08 19:34
sugunavathy17-Feb-08 19:34 
GeneralRe: how to get no Pin
Christian Graus17-Feb-08 19:35
protectorChristian Graus17-Feb-08 19:35 
GeneralRe: how to get no Pin
sugunavathy17-Feb-08 20:00
sugunavathy17-Feb-08 20:00 
GeneralRe: how to get no Pin
Christian Graus17-Feb-08 20:09
protectorChristian Graus17-Feb-08 20:09 

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.