All GREAT points but when you are dealing with old code that they want to
just maintain and NOT enhance this is the kind of situations you have to
deal with.  I COMPLETELY agree with you but sadly my company is moving to a
vb.net front end and maintaing the "green screen" side of the system has a
incredibly low priority.

anyway thanks to everyone for their responses and ideas they are all
appriciated!

thanks everyone

dougc
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ross Ferris
Sent: Sunday, May 04, 2008 8:33 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] passing file pointers?

Wouldn't even BETTER practice be to just ensure that the file is open in
the calling program?

If this is a "well used" routine that is called for a couple of million
records, then even the overhead of this simple check can quickly mount.

Whilst I agree that it is "good" that code should try & catch errors, I
think that this is a classic example of where the real "fix" is to fix
the "problem" that is in the calling routine .... removes a whole error
trap routine (what DO you do if the file isn't open & this is in the
middle of a batch update?) that shouldn't exist in the first place.

YMMV

Ross Ferris
Stamina Software
Visage > Better by Design!


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:owner-u2-
>[EMAIL PROTECTED] On Behalf Of David Jordan
>Sent: Sunday, 4 May 2008 10:11 PM
>To: u2-users@listserver.u2ug.org
>Subject: RE: [U2] passing file pointers?
>
>Use the Fileinfo routine.
>
>If fileinfo(fv,1) =   (if 0 not open, if 1 open)
>
>This checks that is a valid file that is open.
>
>This is good practice to test the file is open before opening, as
>reopening
>the file clears all previous record locks held on that file by that
user
>and
>can cause fatal errors when using transaction boundaries
>
>Regards
>
>David Jordan
>-------
>u2-users mailing list
>u2-users@listserver.u2ug.org
>To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3072 (20080503) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3072 (20080503) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to