William
Mon Jul 05 21:10:34 CDT 2004
--
W.G. Ryan MVP Windows - Embedded
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
"Liddle Feesh" <l@f.com> wrote in message
news:hemGc.3477$Fc7.637712@stones.force9.net...
> Hi,
>
> I have a table named "Person" in a MSDE (2000) database, and am building a
> search form comprising of search fields on the top section (forename,
> surname, telephonenumber, etc) which all correspond to columns to search
in
> the database.
The main objects you'll be working with are the DataTable and the DataView.
You can also use a DataReader and/or the Command Ojbect's Executexxx
methods. (Note that for the Command Object, you have to have a live
connection to the db so it's often not the most practical approach). The
DataTable has a .Select method, there's also a .Find, .FindRows methods and
a RowFilter property of the DataView that will help you.
>
> I'm relatively new to ADO.net and haven't the foggiest about where to
start,
> and need a good example to take apart and learn relatively quickly.
>
> Does anyone have code or know of a good place to look? I've checked out
MSDN
> and the free vb code sites, but no-one has a flexible search form that I
> could reuse.
I don't have a form already built, but check out any of my Efficiently using
Ado.NEt v.XXX articles, I discuss filtering and sorting in depth
http://www.knowdotnet.com/williamryan.html. I have a few other articles
(just search for DataView or DataTable in the search link).
If you get stuck, let me know. ALso, if you want to learn ADO.NET, David
Sceppa's ADO.NET core reference is an invaluable resource and he includes a
pretty cool utility with it for querying a DB and filtering,sorting. Bill
Vaughn's Ado & ADo.net book is another must have.
HTH,
Bill
>
> Any ideas?
>
> Kind Regards,
>
>
> --
>
> Liddle Feesh
> *fap fap fap fap*
> <>< <>< <>< <>< ><>
> <>< <>< <>< <>< <>< <><
>
>