I need someone to point me in the right direction.  i'll give a few
paragraphs of background, but if you just want the question, skip down
to "HERE IS THE QUESTION:"

I was a C programmer in scientific apps before I retired.  I'm now
puttering around with Visual C#.  So I know how to program, but I'm a
little shaky with OOP, and I'm clueless with databases.

There is a freeware disk cataloger called Cathy that I have used for
many years.  It's small and fast.  You give it a starting point, e.g.
folder, drive, CD, etc., and it very quickly builds a database of the
files from there down, recursing through all the subdirectories.  You
do that with as many drives or CDs as you want, and you end up with a
bunch of little databases, one for each drive (or CD or any
combination).  Then when you want to know where a particular jpg file
is, you just type in part of the name, and Cathy almost instantly
finds every file on every drive that matches the string.  I have
dozens of drives with several terabytes of data in millions of files,
and a search only takes a second.  Rebuilding the catalog of a system
partition can take a minute, though.

So, I love Cathy, but it's a bit dated, and its limits are beginning
to be a problem.  The big problem is it's not unicode, and I have a
lot of files and folders with Asian characters that it can't handle
correctly.  I'd also like more flexibility in the search, e.g.ranges
on the date and size, and regex in the search string.  So I want to
write a windows forms app that does all that, just for my use (unless
Bill G calls and offers me a million bucks).

HERE IS THE QUESTION: What is the best way to create and access
databases in a VC# program?  By best, I mean reasonably fast,
reasonably easy to program, and it's all done within my VC# forms app,
i.e. I don't build the DB in SQLServer or something and then use VC#
to query, I do EVERYTHING in VC#.

I have been googling around, and there are all kinds of sites that
talk about database programming with C#, but they all seem to have
different approaches.  There is ADO, LINQ, SQL Server, etc.  I looked
at some books in the bookstore, but I couldn't find one that showed
how to create databases programmatically within VC#.  Half of them had
you type the data in yourself, and the other half had you use
SQLServer or something to create the DB, and then use VC# to query it.

I don't want to do either of those.  I want to programatically recurse
through my folders and enter every file I find into a DB, from within
the VC# app.  Then I want to be able to enter a search string and some
date and size ranges, and see all the files that match.

If someone could tell me generally how to do that, I can probably find
a book to get the details.  If someone could point me to a website
that talks about it, even better.

Thanks for any help.

Reply via email to