On 2015-08-11 02:58, Fernando D. Bozzo wrote:
Hi Mike:

I think that this code have many possibilities to fail, it's not
encapsulated.
I comment on every aspect based on what I can see, and some asumptions of
what I can't see:

1) You do "INSERT INTO (this.cAuditDBF) ...", but I don't see you first
open the table (this.cAuditDBF) with USE command, which is not good
practice and leave the SQL to open the table in no specific way. You
probably are opening this table externally, but then it's not encapsulated on the function, so you are assuming it's open, and if it isn't, then the
INSERT will open it, which is not ok.

2) What is the difference between (this.cAuditDBF) and
(this.GetTableName('audit'))? Are both different Audit table names?

3) Error CATCHING do nothing, you don't even log the error in a text file
with STRTOFILE()

4) This LOG/Audit function should be in a session class (as PRG), so it's
functionality and tables are encapsulated and well separated from the
tables of the system.

5) The LOG/Audit function should open/close his tables, but here, I can't see if this function is part of a LOG/Audit class that do this on another
method.

Is not easy trying to say what is wring if can't see the complete LOG/Audit
implementation, so I may be wrong on some assumptions.


Hi Fernando,

cAuditDBF was the local VFP table; the GetTableName function is a bit different, in that each client/customer has his own tables, so .GetTableName('audit') returns audit__<<clientid>> where that's his custom identifier. Customers using this common database do not share most tables, and that's intentional for isolation.

This approach has allowed me to design this app and have several different customers use it, without me having to code anything special in the app.

tia,
--Mike


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/1d6fee717f3079b8bc7abee06ebde...@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to