DataView rowfilter with Connector/NET Gamma 1.0.2
Posted by: Mika
Date: November 29, 2004 04:46AM

I have tested lately MySQL 4.1.7 with VB.NET 2003 using MySQL Connector/NET Gamma 1.0.2, because I plan and test to convert an application from MS SQL to MySQL in a near future.

My simple Windows Form has two DateTimePickers for selecting date period, and grid (C1.FlexGrid in this case) for showing datatable. when DataTable is created and created DataView of it and bound to grid, I want to use DataView's RowFilter to show this date period user has selected like...

'// Filter using SaveTime Period
Dim strFilter As String = String.Format( _
"(SaveTime >= '{0}' AND Saved <= '{1}')", _
dtePicker1.Value.ToString("yyyy-MM-dd 0:00:00"), _
dtePicker2.Value.ToString("yyyy-MM-dd 23:59:59"))

'// Set RowFilter for DataView, and bind C1FlexGrid
dv.RowFilter = strFilter
_flex.DataSource = dv

...anyway I can do this "filtering" using MySql Query Browser with query like...

SELECT SaveTime, OtherFields... FROM MyTable WHERE SaveTime >= '2004-11-19 0:00:00' AND SaveTime <= '2004-11-25 23:59:59'

I think this is easy, but I haven't succeeded yet.

Thanks in advance of any reply for this!

Options: ReplyQuote

Written By
DataView rowfilter with Connector/NET Gamma 1.0.2
November 29, 2004 04:46AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.