PC Review


Reply
Thread Tools Rate Thread

Accessing data on the hard disk

 
 
Simon Harvey
Guest
Posts: n/a
 
      20th Dec 2003
Hi everyone,

I'm hoping for a little bit of advice on the following. I am in the process
of making a small application that can send, receive and store email
messages. The current area that I am thinking about is how to store messages
on the hard disk and access them when needed.

I dont want to read all the messages in at runtime because that would make
startup take to long. What I think I need to do is to load a 'header' file
at startup, that will just contain summary information - not the actual body
of the message, nor any of the attachments.

This header information will act as a key to another file stored on the
hardisk, which actually contains the rest of the message data.

My question is - How do I make the files? To explain that a little better,
what I mean is, I'm not sure what approach i should take to creating these
two files. Should I create two types of objects and use serialization? Or
maybe I should output XML somehow?

The other thing I am wondering about is how I would then access the complete
message data on the hard disk, using the header information in memory. I'm
thinking about things like - how to access the file quickly and how to
maintain the file in terms of adding and deleting messages.

Then there's the whole area of folders! What about moving messages between
folders! My poor head.

Any advice on how to approach a problem like this would be excellent.

Thanks everyone

Simon


 
Reply With Quote
 
 
 
 
Hermit Dave
Guest
Posts: n/a
 
      20th Dec 2003
Hello Simon,

For mail i would say use database instead of storing the info on hdd.
if you do that
*you can have individual columns to specify the header info for individual
messages
* you can have a column for image type to store you entire mail with
attachments.
* you can also then have pseudo folders. where you just link message id to
folder id
* plus that way you can accomodate more than one users if needed.

Hope this helps... (i did write an app long time back to retrieve pop emails
from online servers for access through intranet)

HD

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:(E-Mail Removed)...
> Hi everyone,
>
> I'm hoping for a little bit of advice on the following. I am in the

process
> of making a small application that can send, receive and store email
> messages. The current area that I am thinking about is how to store

messages
> on the hard disk and access them when needed.
>
> I dont want to read all the messages in at runtime because that would make
> startup take to long. What I think I need to do is to load a 'header' file
> at startup, that will just contain summary information - not the actual

body
> of the message, nor any of the attachments.
>
> This header information will act as a key to another file stored on the
> hardisk, which actually contains the rest of the message data.
>
> My question is - How do I make the files? To explain that a little better,
> what I mean is, I'm not sure what approach i should take to creating these
> two files. Should I create two types of objects and use serialization? Or
> maybe I should output XML somehow?
>
> The other thing I am wondering about is how I would then access the

complete
> message data on the hard disk, using the header information in memory. I'm
> thinking about things like - how to access the file quickly and how to
> maintain the file in terms of adding and deleting messages.
>
> Then there's the whole area of folders! What about moving messages between
> folders! My poor head.
>
> Any advice on how to approach a problem like this would be excellent.
>
> Thanks everyone
>
> Simon
>
>



 
Reply With Quote
 
Simon Harvey
Guest
Posts: n/a
 
      21st Dec 2003
Thank you Mr. Dave!

I have been thinking about using some sort of database, but one thing I am
unsure of is deployment. For example, I would probably like to use Access -
client machines may not have Access installed on them.

Wouldnt Access (or any other DB) need to be installed on the client in order
for this to work?

I'm beginning to think that this isnt the case because a couple of other
people have suggested this approach.

Can I just access the (Access) database using ADO.net as normal, or is their
anything else I need to consider?

Many thanks for your advice Mr Hermit sir!

Kindest Regards

Simon


 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      21st Dec 2003
hey Simon,

Dont go around calling me Sir (i know i have a dodgy name...)... lol i am
just 26....

Well if you are using central server like in the case of intranet then all
you need is a DB on the server (if so go with SQL Server or MSDE if you want
it cheap (read free)
If your program is a standalone on then yes access is good enough or you
could give MSDE a go...
If you are using access you dont need to have access installed on the
machine... ado.net should pick it up just fine...
as long as you are using the correct .net provider. if you are not using
..net provider rather using something like OLEDB or ODBC then you will be
restricted to the version of access you can use.
i reckon sticking to managed provider like SQLClient for MSDE.
If you are not sure bout the drivers... put installing Data Access
Components as a pre requisite... (good old VB packaging and deployment
wizard used to pick it up.. not sure bout the current windows installer)

Have fun coding..

HD

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:%(E-Mail Removed)...
> Thank you Mr. Dave!
>
> I have been thinking about using some sort of database, but one thing I am
> unsure of is deployment. For example, I would probably like to use

Access -
> client machines may not have Access installed on them.
>
> Wouldnt Access (or any other DB) need to be installed on the client in

order
> for this to work?
>
> I'm beginning to think that this isnt the case because a couple of other
> people have suggested this approach.
>
> Can I just access the (Access) database using ADO.net as normal, or is

their
> anything else I need to consider?
>
> Many thanks for your advice Mr Hermit sir!
>
> Kindest Regards
>
> Simon
>
>



 
Reply With Quote
 
Simon Harvey
Guest
Posts: n/a
 
      21st Dec 2003
Thanks Dave,

I'm in the process of making an access database just to see how I get on. Do
you think there would be any advantage to using msde? And would that be just
as easy to deploy?

Thanks again

Simon


 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      21st Dec 2003
Simon
Well easiest is access... you dont have to bother doing anything apart from
copying the file and knowing its path to connect.
MSDE is a stripped down sql server. So if you want features like store
procedures, multiple users etc and take advantage of SqlClient then MSDE is
a good option.

With MSDE you will have to go to the extent of installing it and its only
worth it if you have more than 1 users connecting to the same database. If
it is never going to be more than 1 then why bother. Okay you are limited to
feature on access but still..

Hope this helps,

HD

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:(E-Mail Removed)...
> Thanks Dave,
>
> I'm in the process of making an access database just to see how I get on.

Do
> you think there would be any advantage to using msde? And would that be

just
> as easy to deploy?
>
> Thanks again
>
> Simon
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell what is accessing the hard disk Richard Fangnail Windows Vista General Discussion 2 10th Mar 2010 02:18 AM
accessing my hard disk drives martymonty Windows XP Help 3 14th Dec 2008 10:56 PM
Lost data on 320GB hard disk and corrupted data on 250gb hard disk =?Utf-8?B?SUpWZWxhcw==?= Windows XP General 8 16th Jan 2007 04:26 AM
Accessing data on the hard disk Simon Harvey Microsoft C# .NET 5 21st Dec 2003 03:11 PM
Accessing data on the hard disk Simon Harvey Microsoft Dot NET Framework 5 21st Dec 2003 03:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.