BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pictures in MS Access

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Magnus S. Petersen
Guest





PostPosted: Thu Jan 15, 2004 12:58 pm    Post subject: Pictures in MS Access Reply with quote



Working with Delphi6 Enterprise and WindowsXP
I am working on a small Access database together with Delphi, but i cannot
figure out, how i should make it work with graphic files. I have a small
Employee table where i want to put pictures in of each Employee to be
displayed.
Can anyone assist
Regards
Magnus


Back to top
Rick Carter
Guest





PostPosted: Thu Jan 15, 2004 4:38 pm    Post subject: Re: Pictures in MS Access Reply with quote




"Magnus S. Petersen" <magnus (AT) post (DOT) olivant.fo> wrote:
Quote:
Working with Delphi6 Enterprise and WindowsXP
I am working on a small Access database together with Delphi, but i cannot
figure out, how i should make it work with graphic files. I have a small
Employee table where i want to put pictures in of each Employee to be
displayed.

If you want to keep things simple and reduce chances of data
corruption, best thing is to store the graphics files separately
in their own directory, and add a character field to the table
which stores the name and path of the graphics file.

Rick Carter
[email]carterrk (AT) despammed (DOT) com[/email]
Chair, Paradox/Delphi SIG, Cincinnati PC Users Group


Back to top
Magnus S. Petersen
Guest





PostPosted: Mon Jan 19, 2004 5:01 pm    Post subject: Re: Pictures in MS Access Reply with quote



Thank you very much.
Kind regards
Magnus
"Rick Carter" <carterrk (AT) despammed (DOT) com> skrev i en meddelelse
news:4006cff8 (AT) newsgroups (DOT) borland.com...
Quote:

"Magnus S. Petersen" <magnus (AT) post (DOT) olivant.fo> wrote:
Working with Delphi6 Enterprise and WindowsXP
I am working on a small Access database together with Delphi, but i
cannot
figure out, how i should make it work with graphic files. I have a small
Employee table where i want to put pictures in of each Employee to be
displayed.

If you want to keep things simple and reduce chances of data
corruption, best thing is to store the graphics files separately
in their own directory, and add a character field to the table
which stores the name and path of the graphics file.

Rick Carter
[email]carterrk (AT) despammed (DOT) com[/email]
Chair, Paradox/Delphi SIG, Cincinnati PC Users Group




Back to top
Magnus S. Petersen
Guest





PostPosted: Fri Jan 23, 2004 2:00 pm    Post subject: Re: Pictures in MS Access Reply with quote

Dear Mr.Rick Carter
Forgive me for bothering you again.
I have now changed the picture field in the database to a text field and
have created a separate
directory (C:Databasepicturespersons) on disk for the pictures as you
recommended.
The database text fields have been entered, as this example shows:
"C:DatabasepicturespersonsPersonPict_1.bmp"
"C:DatabasepicturespersonsPersonPict_2.bmp"
etc.
In my DataModule, i have an Employee TTable, where there are persistant
fields created. One of the fields is the
text field with the directory and filename.
On my form i have put a Timage component named ImagePerson.
I had an idea of putting an OnChange procedure to one of the datafields to
load the image from a DBEdit which was
on the form with the datasource and datafield connected to the string.
Something like this.
procedure TfrmCustomer.dbedFirstNameChange(Sender: TObject);
begin
ImagePerson.Picture.LoadFromFile(dbedDirAndFile.Text);
end;

I keep getting an
Debugger Exception Notification
....raised exception class EInvalidGraphic with message 'Unknown picture file
extension(.)'


Can you give me an advice. ?

Regards
Magnus S. Petersen

"Rick Carter" <carterrk (AT) despammed (DOT) com> skrev i en meddelelse
news:4006cff8 (AT) newsgroups (DOT) borland.com...
Quote:

"Magnus S. Petersen" <magnus (AT) post (DOT) olivant.fo> wrote:
Working with Delphi6 Enterprise and WindowsXP
I am working on a small Access database together with Delphi, but i
cannot
figure out, how i should make it work with graphic files. I have a small
Employee table where i want to put pictures in of each Employee to be
displayed.

If you want to keep things simple and reduce chances of data
corruption, best thing is to store the graphics files separately
in their own directory, and add a character field to the table
which stores the name and path of the graphics file.

Rick Carter
[email]carterrk (AT) despammed (DOT) com[/email]
Chair, Paradox/Delphi SIG, Cincinnati PC Users Group




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.