Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
GAC.Me.Up.baby
 
Posts: n/a
Default how can i query an sheet with a where clause....from c# code using

hello ,

i'm triing to retreive buch of row but i want to apply a Where clause, so i
get row = a certain date..... but my Query retreive only 1 row always(the
first one)...but several should match... i even set the col format to string
and still get only 1 row and got no syntax error.. ex:
THE SQL PARM LOOKS LIKE :
"SELECT F12 AS [Strategy], F5 AS [Quantite], F7 AS [Devise], F2 AS
[Portefeuille], F4 AS [Ticker], F1 AS [Date], F3 AS [TradeType], F9 AS
[Status], F10 AS [Courtier], F8 AS [Commision], F11 AS [Commentaire], F6 AS
[Prix] FROM [2002$] WHERE F1 ='11/28/2005' "

Method call:

public DataTable Select(string sql)
{
OleDbDataAdapter da = new OleDbDataAdapter(sql, _connection);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}

Anything wrong with the where clause..??? i even put the col format has
string and copy the exact string im looking for in the col ...but the query
still returning only 1 row (the first one).... and should be way more.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
lock tab in sheet 2 until cell in sheet one is completed john tempest Excel Worksheet Functions 7 November 24th 05 08:45 AM
vb code - Automatic transfer of data from one sheet to another herr_bench Excel Worksheet Functions 1 November 24th 05 12:15 AM
Sheet Protection and VBA Code TheRobsterUK Excel Discussion (Misc queries) 1 May 27th 05 05:18 PM
how can i select all the cells with same color on a sheet if there are multipale colors by vba code uobt Charts and Charting in Excel 1 December 15th 04 05:27 PM
Problem Code: Retrieving Stored Access 03 Query Bettergains Excel Discussion (Misc queries) 2 December 7th 04 04:11 PM


All times are GMT +1. The time now is 05:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"