Board index » delphi » Two Delphi questions

Two Delphi questions

Hi!

First of all, sorry for the heavy cross-post but I'm kinda desperate.

I've been searching everywhere for information about databases and Delphi.
I've found alot of information, but none regarding how I call for a database
from within the program and how i read/write from/to it. I would like to try
and add an Access database to my program.

The second question I have is, how do I change the settings for a file? ie
how do I check/uncheck read-only, hidden, archive and system?

Thanks in advance,
Tobias Bengtsson

PS. Please reply to my mail and not to the newsgroup. Thanks DS

 

Re:Two Delphi questions


Quote
Tobias Bengtsson wrote:
> Hi!

> First of all, sorry for the heavy cross-post but I'm kinda desperate.

> I've been searching everywhere for information about databases and Delphi.
> I've found alot of information, but none regarding how I call for a database
> from within the program and how i read/write from/to it. I would like to try
> and add an Access database to my program.

Why not  use the DataBaseComponents in the normal VCL

Quote
> The second question I have is, how do I change the settings for a file? ie
> how do I check/uncheck read-only, hidden, archive and system?

Why not use the FileGetAttr-function
FJK
Quote
> Thanks in advance,
> Tobias Bengtsson

> PS. Please reply to my mail and not to the newsgroup. Thanks DS

Re:Two Delphi questions


Sorry mate,don't know anything about databases but as for file attributes
use FileGetAttr() and FileSetAttr()
check out the help files to find out how to use these functions

Attrs := FileGetAttr('MyFile.sys');

if Attrs and faHidden <> 0 then
  FileSetAttr('MyFile.sys', Attrs - faHidden);

Scotter.

Quote
Tobias Bengtsson <tobias.bengts...@persilja.net> wrote in message

news:H%S25.499$yM5.191495168@newsb.telia.net...
Quote
> Hi!

> First of all, sorry for the heavy cross-post but I'm kinda desperate.

> I've been searching everywhere for information about databases and Delphi.
> I've found alot of information, but none regarding how I call for a
database
> from within the program and how i read/write from/to it. I would like to
try
> and add an Access database to my program.

> The second question I have is, how do I change the settings for a file? ie
> how do I check/uncheck read-only, hidden, archive and system?

> Thanks in advance,
> Tobias Bengtsson

> PS. Please reply to my mail and not to the newsgroup. Thanks DS

Other Threads