473,327 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Accessing data on the hard disk

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
Jul 21 '05 #1
5 1679
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:uq**************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #2
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
Jul 21 '05 #3
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:%2****************@TK2MSFTNGP11.phx.gbl...
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

Jul 21 '05 #4
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
Jul 21 '05 #5
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:OR**************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: King W.Wang | last post by:
Hi all, I've deleted 2 folders and emptied the trash bin on a hard disk in Windows XP. And then I found that I've no back-up of these folders. I want to rescue the data in these folders. The hard...
5
by: Simon Harvey | last post by:
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...
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
0
by: jd_12345 | last post by:
Windows XP Pro SP2 Excel 2003 SP2 IBM DB2 Personal Edition accessing a DB2 database on an AIX server via the DB2 ODBC driver I am accessing an external DB via MS Excel using Data-->Import...
3
by: noridotjabi | last post by:
Say I'm writting a program. In this program for some reason I need to store data somewere were I will be able to access it again. I don't want to store it in a file because then it could be...
37
by: Neo | last post by:
Hi, I want to write a program that essentially connects to web, access some web page and pass some parameters and fetch the return values and print like LWP in Perl Context. Can some one...
3
by: suresh_nsnguys | last post by:
Hi, Whether its possible to store the server data(jpg,flash and movie files) in the client hard disk.because i heard we can loaded in to RAM using javascript preloader .Its getting loaded in...
29
by: faq | last post by:
Hello- My computer came with a 40GB Maxtor DiamondPlus hard disk drive. I added an 80GB Maxtor DiamondPlus drive as a slave on the same IDE ATA cable, but the BIOS doesn't detect the new drive....
1
by: madhavi28 | last post by:
Here is my problem, I have postgresql 8.1 installed and I stored the data in D: drive. Suddenly my system crashed and I had to replace the hard disk and there was no backup maintained. The only...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.