Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: jpeg photos with access 2


Message #1 by "jagatar rattanpal" <jagatar.rattanpal@l...> on Wed, 23 Oct 2002 11:04:31
I have an Access 2 Database which stores paths to .jpeg photo's which are 
stored on a server.

When I delete a record on the Database it only deletes the path to 
the .jpeg photo.

How can I :- 

1. Delete the .jpeg photo on the server when I delete a record on the 
database

2. Delete all the .jpeg photo's on the server that do not have a valid 
record on the database.
Message #2 by joe.dunn@c... on Wed, 23 Oct 2002 11:41:15 +0000
I would not have thought that 'automatically' deleting .jpg files when a
database record is deleted is wise. I would be afraid of losing files that
I might have use for on other occasions.

I do not think there is any simple way of doing it anyway.......however, as
a concept, if your system was designed so that records were only deleted by
hitting a button, you could (before deleting the relevant record):

   copy the path data to a holding table
   periodically use the holding table to generate a text file which can
   then be used as a batch file
   run the batch file and delete the items

Needs a bit of work but that's the way I would go about it!




                                                                                                             
                      "jagatar rattanpal"                                                                    
                      <jagatar.rattanpal@l...         To:      "Access" <access@p...>                  
                      eds.gov.uk>                   cc:                                                      
                                                    Subject: [access] jpeg photos with access 2              
                      23/10/2002 11:04                                                                       
                      Please respond to                                                                      
                      "Access"                                                                               
                                                                                                             
                                                                                                             




I have an Access 2 Database which stores paths to .jpeg photo's which are
stored on a server.

When I delete a record on the Database it only deletes the path to
the .jpeg photo.

How can I :-

1. Delete the .jpeg photo on the server when I delete a record on the
database

2. Delete all the .jpeg photo's on the server that do not have a valid
record on the database.



*************************************************************************

This e-mail may contain confidential information or be privileged. It is intended to be read and used only by the named
recipient(s). If you are not the intended recipient(s) please notify us immediately so that we can make arrangements for its return:
you should not disclose the contents of this e-mail to any other person, or take any copies. Unless stated otherwise by an
authorised individual, nothing contained in this e-mail is intended to create binding legal obligations between us and opinions
expressed are those of the individual author.

The CIS marketing group, which is regulated for Investment Business by the Financial Services Authority, includes:
Co-operative Insurance Society Limited Registered in England number 3615R - for life assurance and pensions
CIS Unit Managers Limited Registered in England and Wales number 2369965  - for unit trusts and PEPs
CIS Policyholder Services Limited Registered in England and Wales number 3390839 - for ISAs and investment products bearing the CIS
name
Registered offices: Miller Street, Manchester M60 0AL   Telephone  0161-832-8686   Internet  http://www.cis.co.uk   E-mail
cis@c...

CIS Deposit and Instant Access Savings Accounts are held with The Co-operative Bank p.l.c., registered in England and Wales number
990937, P.O. Box 101, 1 Balloon Street, Manchester M60 4EP, and administered by CIS Policyholder Services Limited as agent of the
Bank.

CIS is a member of the General Insurance Standards Council

CIS & the CIS logo (R) Co-operative Insurance Society Limited

********************************************************************************
Message #3 by "George Oro" <george@c...> on Thu, 24 Oct 2002 09:26:34 +0400
Jag,

Try to add this to your code:


dim strMyPhotoPath
strMyPhotoPath = Me.MyPhotoPath

'Do you want to Delete this record?
	if Yes
		Delete Record
		Kill strMyPhotoPath
		Operation completed...
	else
		Operation canceled...
	end if

HTH
GEORGE

-----Original Message-----
From: jagatar rattanpal [mailto:jagatar.rattanpal@l...]
Sent: Wednesday, October 23, 2002 11:05 AM
To: Access
Subject: [access] jpeg photos with access 2


I have an Access 2 Database which stores paths to .jpeg photo's which are 
stored on a server.

When I delete a record on the Database it only deletes the path to 
the .jpeg photo.

How can I :- 

1. Delete the .jpeg photo on the server when I delete a record on the 
database

2. Delete all the .jpeg photo's on the server that do not have a valid 
record on the database.

Message #4 by "George Oro" <george@c...> on Thu, 24 Oct 2002 10:00:16 +0400
Sorry I forgot "as String" after dim strMyPhotoPath:
dim strMyPhotoPath as String




-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Thursday, October 24, 2002 9:27 AM
To: Access
Subject: [access] RE: jpeg photos with access 2


Jag,

Try to add this to your code:


dim strMyPhotoPath
strMyPhotoPath = Me.MyPhotoPath

'Do you want to Delete this record?
	if Yes
		Delete Record
		Kill strMyPhotoPath
		Operation completed...
	else
		Operation canceled...
	end if

HTH
GEORGE

-----Original Message-----
From: jagatar rattanpal [mailto:jagatar.rattanpal@l...]
Sent: Wednesday, October 23, 2002 11:05 AM
To: Access
Subject: [access] jpeg photos with access 2


I have an Access 2 Database which stores paths to .jpeg photo's which are 
stored on a server.

When I delete a record on the Database it only deletes the path to 
the .jpeg photo.

How can I :- 

1. Delete the .jpeg photo on the server when I delete a record on the 
database

2. Delete all the .jpeg photo's on the server that do not have a valid 
record on the database.




  Return to Index