Re: VFP9SP2 pop-up box for nearly everything
Hmm ncount=.T. ? ,(ncount=9), will not work, you are comparing a logical value to an integer, VFP errors, correctly Operator/Operant type mismatch I believe. Rgds, Koen 2015-08-11 10:41 GMT+02:00 Dave Crozier da...@flexipol.co.uk: Mike, I'd also give the line: llOK = this.ExecuteSQL(lcSQL) = 1 a look as I think the this could cause you problems if the ExecuteSQL is returning back a boolean value Personally, even though I use it occasionally I am not a fan of in line assignments and would split it up into two separate assignments. In fact VFP seems to return weird results when comparing Boolean values to integer values, Try the following: ncount=9 ? ,(ncount=9), And then ncount=.T. ? ,(ncount=9), Look at the output the second ? returns back nothing after the initial Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: 11 August 2015 04:21 To: ProFox Email List profox@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Well, I should confess that it's some bug in this code of mine, although I've retooled this to totally eliminate the DBF file and just go right to my backend (MySQL). This was the old code. No doubt I had something assumed/wrong with my DBF table: FUNCTION Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical * Audits form usage. *** mjb 05/15/2014 - using local audit table so no remote database connection needed at startup; will be *** mjb 01/07/2015 - using PRIVATE vars in INSERT cmd *** mjb 07/29/2015 - changed local name to match for client LOCAL llOK as Logical, lcSQL as String, loException as Exception, lcLocal as String, liHandle as Integer PRIVATE pcUserID, pcModule, pcUniqueID, pcSessionID TRY liHandle = this.GetHandle() mjb 07-29-15 lcLocal = ADDBS(JUSTPATH(this.cAuditDBF)) + this.GetTableName('audit') + .dbf IF NOT FILE(lcLocal) THEN CREATE TABLE (lcLocal) (user c(16), module c(30), uniqueid c(10), sessionid c(10), entering l, uploaded l, tlocal t) ENDIF USE IN (SELECT(JUSTSTEM(lcLocal))) make sure not exclusive IF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) THEN pcUserID = tcUserID ELSE *** mjb 07/29/2015 - adjusted for startup call from main where oUtils.oUser not yet existing IF TYPE(oUtils.oUser) = O THEN pcUserID = ALLTRIM(oUtils.oUser.cID) ELSE pcUserID = SYS(0) ENDIF ENDIF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) IF PEMSTATUS(_screen,cUniqueID,5) THEN pcSessionID = _screen.cUniqueID ELSE pcSessionID = 'unknown' ENDIF ltLocal = DATETIME() IF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) THEN pcUniqueID = tcUniqueID ELSE pcUniqueID = '' ENDIF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) INSERT INTO (this.cAuditDBF) (user, module, uniqueid, sessionid, entering, tlocal) ; VALUES (pcUserID, ALLTRIM(tcFormName), pcUniqueID, pcSessionID, tlEntering, ltLocal) IF liHandle 0 THEN lcTable = this.GetTableName('audit') TEXT TO lcSQL PRETEXT 15 NOSHOW TEXTMERGE INSERT INTO lcTable (user, module, uniqueid, sessionid, entering, tlocal) VALUES (?pcUserID,'ALLTRIM(tcFormName)',?pcUniqueID,?pcSessionID,IIF(tlEntering,1,0),'TTOC(ltLocal,1)') ENDTEXT llOK = this.ExecuteSQL(lcSQL) = 1 IF llOK THEN REPLACE uploaded WITH .T. IN (JUSTSTEM(this.cAuditDBF)) ELSE SET STEP ON ENDIF llOK ENDIF CATCH TO loException llOK = .F. *SET STEP ON ENDTRY RETURN llOK ENDFUNC Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical Thanks again to all of you who chimed in! [excessive quoting removed by server] ___ 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
Re: Appointment tracker
2015-08-11 1:05 GMT+02:00 Ted Roche tedro...@gmail.com: I haven't heard TSR in a long time :) I'd recommend you develop the functionality as a plain 'ol FoxPro EXE and then launch it every 15 minutes (or 10 or 5, depending on how much precision you need) that opens, reads the tables, pops up its reminders, then closes. Add it to the Windows Schedule Tasks applet, which has a decent app for scheduling that lets you set things like 8 AM to 6 PM, Monday through Friday, for example. And isn't easier to put the EXE on the Start folder, so it executes when Windows starts, and keep in memory as a TSR? Why the need to shut it down and start up all the time? It simply can hide, wait and show when it's time, user close it (hideing, not real close) and start all over again. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ 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/CAGQ_JukCGyMOLPaw1PYtH-H7gyvmCx=5-kEwvswe1d=be37...@mail.gmail.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.
RE: Appointment tracker
What about a dll? That doesn't have a UI Al -Original Message- I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. ___ 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/001201d0d40b$fca169f0$f5e43dd0$@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.
RE: VFP9SP2 pop-up box for nearly everything
Paul, I was a little confused for a while at your comment as that is what I thought should have happened... Turns out I had run an old legacy program that had on error * hence the lack of an error message. Note to self ... after running old programs reset on error.. DOH!!! I really am not having a good day 90 minutes onto Apple support for my iphone and they told me I could have a genius appointment at the local apple centre for 3 weeks on Wednesday How useful is that!!. Grrr!!! Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Paul Newton Sent: 11 August 2015 09:48 To: profox@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Dave Yes, but it also throws an operator/operand type mismatch error Paul -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 11 August 2015 09:41 To: profoxt...@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Mike, I'd also give the line: llOK = this.ExecuteSQL(lcSQL) = 1 a look as I think the this could cause you problems if the ExecuteSQL is returning back a boolean value Personally, even though I use it occasionally I am not a fan of in line assignments and would split it up into two separate assignments. In fact VFP seems to return weird results when comparing Boolean values to integer values, Try the following: ncount=9 ? ,(ncount=9), And then ncount=.T. ? ,(ncount=9), Look at the output the second ? returns back nothing after the initial Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: 11 August 2015 04:21 To: ProFox Email List profox@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Well, I should confess that it's some bug in this code of mine, although I've retooled this to totally eliminate the DBF file and just go right to my backend (MySQL). This was the old code. No doubt I had something assumed/wrong with my DBF table: FUNCTION Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical * Audits form usage. *** mjb 05/15/2014 - using local audit table so no remote database connection needed at startup; will be *** mjb 01/07/2015 - using PRIVATE vars in INSERT cmd *** mjb 07/29/2015 - changed local name to match for client LOCAL llOK as Logical, lcSQL as String, loException as Exception, lcLocal as String, liHandle as Integer PRIVATE pcUserID, pcModule, pcUniqueID, pcSessionID TRY liHandle = this.GetHandle() mjb 07-29-15 lcLocal = ADDBS(JUSTPATH(this.cAuditDBF)) + this.GetTableName('audit') + .dbf IF NOT FILE(lcLocal) THEN CREATE TABLE (lcLocal) (user c(16), module c(30), uniqueid c(10), sessionid c(10), entering l, uploaded l, tlocal t) ENDIF USE IN (SELECT(JUSTSTEM(lcLocal))) make sure not exclusive IF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) THEN pcUserID = tcUserID ELSE *** mjb 07/29/2015 - adjusted for startup call from main where oUtils.oUser not yet existing IF TYPE(oUtils.oUser) = O THEN pcUserID = ALLTRIM(oUtils.oUser.cID) ELSE pcUserID = SYS(0) ENDIF ENDIF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) IF PEMSTATUS(_screen,cUniqueID,5) THEN pcSessionID = _screen.cUniqueID ELSE pcSessionID = 'unknown' ENDIF ltLocal = DATETIME() IF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) THEN pcUniqueID = tcUniqueID ELSE pcUniqueID = '' ENDIF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) INSERT INTO (this.cAuditDBF) (user, module, uniqueid, sessionid, entering, tlocal) ; VALUES (pcUserID, ALLTRIM(tcFormName), pcUniqueID, pcSessionID, tlEntering, ltLocal) IF liHandle 0 THEN lcTable = this.GetTableName('audit') TEXT TO lcSQL PRETEXT 15 NOSHOW TEXTMERGE INSERT INTO lcTable (user, module, uniqueid, sessionid, entering, tlocal) VALUES (?pcUserID,'ALLTRIM(tcFormName)',?pcUniqueID,?pcSessionID,IIF(tlEntering,1,0),'TTOC(ltLocal,1)') ENDTEXT llOK = this.ExecuteSQL(lcSQL) = 1 IF llOK THEN REPLACE uploaded WITH .T. IN (JUSTSTEM(this.cAuditDBF)) ELSE
Re: Appointment tracker
I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Tue, 11 Aug 2015, at 12:05 AM, Ted Roche wrote: I haven't heard TSR in a long time :) I'd recommend you develop the functionality as a plain 'ol FoxPro EXE and then launch it every 15 minutes (or 10 or 5, depending on how much precision you need) that opens, reads the tables, pops up its reminders, then closes. Add it to the Windows Schedule Tasks applet, which has a decent app for scheduling that lets you set things like 8 AM to 6 PM, Monday through Friday, for example. On Mon, Aug 10, 2015 at 1:30 PM, jerry foote jerryfo...@bellsouth.net wrote: I would like to create a application in visual Foxpro that monitors some tables and triggers some alarm based on dates and times in a table and run in background like a TSR. Is this possible in VFP9 Thanks jerry --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] ___ 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/1439279272.159094.353087497.78c49...@webmail.messagingengine.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.
RE: Appointment tracker
I use a com object, a dll, and Kevin Ragsdale desktop alerts, works very well and do not slows the main program. Pepe Llopis -Mensaje original- De: ProFox [mailto:profox-boun...@leafe.com] En nombre de Allen Enviado el: martes, 11 de agosto de 2015 10:02 Para: profox@leafe.com Asunto: RE: Appointment tracker What about a dll? That doesn't have a UI Al -Original Message- I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. [excessive quoting removed by server] ___ 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/0AE0EBEBAC8F4B56901E3E88387B30D9@LENOVO1 ** 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.
RE: VFP9SP2 pop-up box for nearly everything
Mike, I'd also give the line: llOK = this.ExecuteSQL(lcSQL) = 1 a look as I think the this could cause you problems if the ExecuteSQL is returning back a boolean value Personally, even though I use it occasionally I am not a fan of in line assignments and would split it up into two separate assignments. In fact VFP seems to return weird results when comparing Boolean values to integer values, Try the following: ncount=9 ? ,(ncount=9), And then ncount=.T. ? ,(ncount=9), Look at the output the second ? returns back nothing after the initial Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: 11 August 2015 04:21 To: ProFox Email List profox@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Well, I should confess that it's some bug in this code of mine, although I've retooled this to totally eliminate the DBF file and just go right to my backend (MySQL). This was the old code. No doubt I had something assumed/wrong with my DBF table: FUNCTION Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical * Audits form usage. *** mjb 05/15/2014 - using local audit table so no remote database connection needed at startup; will be *** mjb 01/07/2015 - using PRIVATE vars in INSERT cmd *** mjb 07/29/2015 - changed local name to match for client LOCAL llOK as Logical, lcSQL as String, loException as Exception, lcLocal as String, liHandle as Integer PRIVATE pcUserID, pcModule, pcUniqueID, pcSessionID TRY liHandle = this.GetHandle() mjb 07-29-15 lcLocal = ADDBS(JUSTPATH(this.cAuditDBF)) + this.GetTableName('audit') + .dbf IF NOT FILE(lcLocal) THEN CREATE TABLE (lcLocal) (user c(16), module c(30), uniqueid c(10), sessionid c(10), entering l, uploaded l, tlocal t) ENDIF USE IN (SELECT(JUSTSTEM(lcLocal))) make sure not exclusive IF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) THEN pcUserID = tcUserID ELSE *** mjb 07/29/2015 - adjusted for startup call from main where oUtils.oUser not yet existing IF TYPE(oUtils.oUser) = O THEN pcUserID = ALLTRIM(oUtils.oUser.cID) ELSE pcUserID = SYS(0) ENDIF ENDIF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) IF PEMSTATUS(_screen,cUniqueID,5) THEN pcSessionID = _screen.cUniqueID ELSE pcSessionID = 'unknown' ENDIF ltLocal = DATETIME() IF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) THEN pcUniqueID = tcUniqueID ELSE pcUniqueID = '' ENDIF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) INSERT INTO (this.cAuditDBF) (user, module, uniqueid, sessionid, entering, tlocal) ; VALUES (pcUserID, ALLTRIM(tcFormName), pcUniqueID, pcSessionID, tlEntering, ltLocal) IF liHandle 0 THEN lcTable = this.GetTableName('audit') TEXT TO lcSQL PRETEXT 15 NOSHOW TEXTMERGE INSERT INTO lcTable (user, module, uniqueid, sessionid, entering, tlocal) VALUES (?pcUserID,'ALLTRIM(tcFormName)',?pcUniqueID,?pcSessionID,IIF(tlEntering,1,0),'TTOC(ltLocal,1)') ENDTEXT llOK = this.ExecuteSQL(lcSQL) = 1 IF llOK THEN REPLACE uploaded WITH .T. IN (JUSTSTEM(this.cAuditDBF)) ELSE SET STEP ON ENDIF llOK ENDIF CATCH TO loException llOK = .F. *SET STEP ON ENDTRY RETURN llOK ENDFUNC Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical Thanks again to all of you who chimed in! [excessive quoting removed by server] ___ 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/18725b8cd2d5d247873a2baf401d4ab2598c7...@ex2010-a-fpl.fpl.LOCAL ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement
RE: Appointment tracker
+1 for Desktop Alerts -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of José Enrique Llopis Sent: 11 August 2015 09:16 To: profoxt...@leafe.com Subject: RE: Appointment tracker I use a com object, a dll, and Kevin Ragsdale desktop alerts, works very well and do not slows the main program. Pepe Llopis -Mensaje original- De: ProFox [mailto:profox-boun...@leafe.com] En nombre de Allen Enviado el: martes, 11 de agosto de 2015 10:02 Para: profox@leafe.com Asunto: RE: Appointment tracker What about a dll? That doesn't have a UI Al -Original Message- I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. [excessive quoting removed by server] ___ 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/9a8106afb0ef9b44b69045c4448935a2b487c...@nlbawexmbx1.infor.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.
RE: VFP9SP2 pop-up box for nearly everything
Dave Yes, but it also throws an operator/operand type mismatch error Paul -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 11 August 2015 09:41 To: profoxt...@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Mike, I'd also give the line: llOK = this.ExecuteSQL(lcSQL) = 1 a look as I think the this could cause you problems if the ExecuteSQL is returning back a boolean value Personally, even though I use it occasionally I am not a fan of in line assignments and would split it up into two separate assignments. In fact VFP seems to return weird results when comparing Boolean values to integer values, Try the following: ncount=9 ? ,(ncount=9), And then ncount=.T. ? ,(ncount=9), Look at the output the second ? returns back nothing after the initial Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: 11 August 2015 04:21 To: ProFox Email List profox@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything Well, I should confess that it's some bug in this code of mine, although I've retooled this to totally eliminate the DBF file and just go right to my backend (MySQL). This was the old code. No doubt I had something assumed/wrong with my DBF table: FUNCTION Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical * Audits form usage. *** mjb 05/15/2014 - using local audit table so no remote database connection needed at startup; will be *** mjb 01/07/2015 - using PRIVATE vars in INSERT cmd *** mjb 07/29/2015 - changed local name to match for client LOCAL llOK as Logical, lcSQL as String, loException as Exception, lcLocal as String, liHandle as Integer PRIVATE pcUserID, pcModule, pcUniqueID, pcSessionID TRY liHandle = this.GetHandle() mjb 07-29-15 lcLocal = ADDBS(JUSTPATH(this.cAuditDBF)) + this.GetTableName('audit') + .dbf IF NOT FILE(lcLocal) THEN CREATE TABLE (lcLocal) (user c(16), module c(30), uniqueid c(10), sessionid c(10), entering l, uploaded l, tlocal t) ENDIF USE IN (SELECT(JUSTSTEM(lcLocal))) make sure not exclusive IF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) THEN pcUserID = tcUserID ELSE *** mjb 07/29/2015 - adjusted for startup call from main where oUtils.oUser not yet existing IF TYPE(oUtils.oUser) = O THEN pcUserID = ALLTRIM(oUtils.oUser.cID) ELSE pcUserID = SYS(0) ENDIF ENDIF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) IF PEMSTATUS(_screen,cUniqueID,5) THEN pcSessionID = _screen.cUniqueID ELSE pcSessionID = 'unknown' ENDIF ltLocal = DATETIME() IF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) THEN pcUniqueID = tcUniqueID ELSE pcUniqueID = '' ENDIF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) INSERT INTO (this.cAuditDBF) (user, module, uniqueid, sessionid, entering, tlocal) ; VALUES (pcUserID, ALLTRIM(tcFormName), pcUniqueID, pcSessionID, tlEntering, ltLocal) IF liHandle 0 THEN lcTable = this.GetTableName('audit') TEXT TO lcSQL PRETEXT 15 NOSHOW TEXTMERGE INSERT INTO lcTable (user, module, uniqueid, sessionid, entering, tlocal) VALUES (?pcUserID,'ALLTRIM(tcFormName)',?pcUniqueID,?pcSessionID,IIF(tlEntering,1,0),'TTOC(ltLocal,1)') ENDTEXT llOK = this.ExecuteSQL(lcSQL) = 1 IF llOK THEN REPLACE uploaded WITH .T. IN (JUSTSTEM(this.cAuditDBF)) ELSE SET STEP ON ENDIF llOK ENDIF CATCH TO loException llOK = .F. *SET STEP ON ENDTRY RETURN llOK ENDFUNC Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical Thanks again to all of you who chimed in! [excessive quoting removed by server] ___ 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:
Re: Appointment tracker
Where can I get Kevin Ragsdales's Desktop Alerts? Laurie On 11 August 2015 at 09:27, Paul Newton paul.new...@pegasus.co.uk wrote: +1 for Desktop Alerts -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of José Enrique Llopis Sent: 11 August 2015 09:16 To: profoxt...@leafe.com Subject: RE: Appointment tracker I use a com object, a dll, and Kevin Ragsdale desktop alerts, works very well and do not slows the main program. Pepe Llopis -Mensaje original- De: ProFox [mailto:profox-boun...@leafe.com] En nombre de Allen Enviado el: martes, 11 de agosto de 2015 10:02 Para: profox@leafe.com Asunto: RE: Appointment tracker What about a dll? That doesn't have a UI Al -Original Message- I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. [excessive quoting removed by server] ___ 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/camvtr9fh8ir4odtryxnfhusnbtd3sm3h8jwzwzwqmsj7y9c...@mail.gmail.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.
Re: VFP9SP2 pop-up box for nearly everything
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. Best Regards.- 2015-08-11 5:20 GMT+02:00 mbsoftwaresoluti...@mbsoftwaresolutions.com: Well, I should confess that it's some bug in this code of mine, although I've retooled this to totally eliminate the DBF file and just go right to my backend (MySQL). This was the old code. No doubt I had something assumed/wrong with my DBF table: FUNCTION Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical * Audits form usage. *** mjb 05/15/2014 - using local audit table so no remote database connection needed at startup; will be *** mjb 01/07/2015 - using PRIVATE vars in INSERT cmd *** mjb 07/29/2015 - changed local name to match for client LOCAL llOK as Logical, lcSQL as String, loException as Exception, lcLocal as String, liHandle as Integer PRIVATE pcUserID, pcModule, pcUniqueID, pcSessionID TRY liHandle = this.GetHandle() mjb 07-29-15 lcLocal = ADDBS(JUSTPATH(this.cAuditDBF)) + this.GetTableName('audit') + .dbf IF NOT FILE(lcLocal) THEN CREATE TABLE (lcLocal) (user c(16), module c(30), uniqueid c(10), sessionid c(10), entering l, uploaded l, tlocal t) ENDIF USE IN (SELECT(JUSTSTEM(lcLocal))) make sure not exclusive IF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) THEN pcUserID = tcUserID ELSE *** mjb 07/29/2015 - adjusted for startup call from main where oUtils.oUser not yet existing IF TYPE(oUtils.oUser) = O THEN pcUserID = ALLTRIM(oUtils.oUser.cID) ELSE pcUserID = SYS(0) ENDIF ENDIF VARTYPE(tcUserID) = C AND NOT EMPTY(tcUserID) IF PEMSTATUS(_screen,cUniqueID,5) THEN pcSessionID = _screen.cUniqueID ELSE pcSessionID = 'unknown' ENDIF ltLocal = DATETIME() IF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) THEN pcUniqueID = tcUniqueID ELSE pcUniqueID = '' ENDIF VARTYPE(tcUniqueID) = C AND NOT EMPTY(tcUniqueID) INSERT INTO (this.cAuditDBF) (user, module, uniqueid, sessionid, entering, tlocal) ; VALUES (pcUserID, ALLTRIM(tcFormName), pcUniqueID, pcSessionID, tlEntering, ltLocal) IF liHandle 0 THEN lcTable = this.GetTableName('audit') TEXT TO lcSQL PRETEXT 15 NOSHOW TEXTMERGE INSERT INTO lcTable (user, module, uniqueid, sessionid, entering, tlocal) VALUES (?pcUserID,'ALLTRIM(tcFormName)',?pcUniqueID,?pcSessionID,IIF(tlEntering,1,0),'TTOC(ltLocal,1)') ENDTEXT llOK = this.ExecuteSQL(lcSQL) = 1 IF llOK THEN REPLACE uploaded WITH .T. IN (JUSTSTEM(this.cAuditDBF)) ELSE SET STEP ON ENDIF llOK ENDIF CATCH TO loException llOK = .F. *SET STEP ON ENDTRY RETURN llOK ENDFUNC Audit(tcFormName as String, tcUniqueID as String, tlEntering as Logical, tcUserID as String, tcSessionID as String) as Logical Thanks again to all of you who chimed in! [excessive quoting
Re: Appointment tracker
On Tue, Aug 11, 2015 at 2:25 AM, Fernando D. Bozzo fdbo...@gmail.com wrote: And isn't easier to put the EXE on the Start folder, so it executes when Windows starts, and keep in memory as a TSR? Easier, yes. Why the need to shut it down and start up all the time? Well, there are tradeoffs. VFP consumes resources, and you'll need to be careful not to trigger a memory leak, runaway CPU loops or never-closed temp files, all of which you avoid in the simple invoke-run-close script model. You're probably going to need to invoke the Windows API Sleep functions to minimize CPU load, and you'll want to unload all the tables so that they can be updated, packed and reindexed outside of the reminder app. So why keep taking up memory? Scripts are simpler to update (just replace it, no need to have a service interface to start, stop and shutdown a service). Schedule changes can be handled with the Scheduled Tasks UI, a feature you don't have to write, nor debug. If it runs for 5 seconds every 5 minutes, and doesn't need to run all night or on weekends (my assumption) then you ought to schedule it to run to the 1/60th of the time in 40% of the schedule it's needed. VFP is designed to be used as a full-screen, interactive CRUD database tool. If you really only need a simple script to check to see if an item is scheduled and launch a reminder, you're not using all the power of VFP, nor using it for what it was intended. but it's better as a simple invoked script than a Windows service, imo. It simply can hide, wait and show when it's time, user close it (hideing, not real close) and start all over again. That is an alternate design, with the advantage of quick startup, in exchange for memory and CPU consumption. A different sent of tradeoffs.One design may win out over the other depending on specifics of the original poster's situation. ___ 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/CACW6n4vsZYFJVXRip+i50=c-9cd-yenksolu3wr7ytelysn...@mail.gmail.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.
Re: Appointment tracker
Thanks - found it there. Laurie On 11 August 2015 at 11:16, Alan Bourke alanpbou...@fastmail.fm wrote: VFPX probably. -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Tue, 11 Aug 2015, at 11:07 AM, Laurie Alvey wrote: Where can I get Kevin Ragsdales's Desktop Alerts? Laurie On 11 August 2015 at 09:27, Paul Newton paul.new...@pegasus.co.uk wrote: +1 for Desktop Alerts -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of José Enrique Llopis Sent: 11 August 2015 09:16 To: profoxt...@leafe.com Subject: RE: Appointment tracker I use a com object, a dll, and Kevin Ragsdale desktop alerts, works very well and do not slows the main program. Pepe Llopis -Mensaje original- De: ProFox [mailto:profox-boun...@leafe.com] En nombre de Allen Enviado el: martes, 11 de agosto de 2015 10:02 Para: profox@leafe.com Asunto: RE: Appointment tracker What about a dll? That doesn't have a UI Al -Original Message- I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. [excessive quoting removed by server] ___ 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/camvtr9cpzfxhtgffuzgyqtwmgfxs_mgwrvxdrjaoeyknw0y...@mail.gmail.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.
Re: VFP9SP2 pop-up box for nearly everything
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.
RE: VFP9SP2 pop-up box for nearly everything
Mike, As I said, it was my fault having on error * and if your routine had returned anything not integer then it would have thrown an error! Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: 11 August 2015 13:25 To: ProFox Email List profox@leafe.com Subject: RE: VFP9SP2 pop-up box for nearly everything On 2015-08-11 04:41, Dave Crozier wrote: Mike, I'd also give the line: llOK = this.ExecuteSQL(lcSQL) = 1 a look as I think the this could cause you problems if the ExecuteSQL is returning back a boolean value Personally, even though I use it occasionally I am not a fan of in line assignments and would split it up into two separate assignments. In fact VFP seems to return weird results when comparing Boolean values to integer values, Try the following: ncount=9 ? ,(ncount=9), And then ncount=.T. ? ,(ncount=9), Look at the output the second ? returns back nothing after the initial Hi Dave! ExecuteSQL is my function that does the SQLEXEC and returns an integer. [excessive quoting removed by server] ___ 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/18725b8cd2d5d247873a2baf401d4ab2598c7...@ex2010-a-fpl.fpl.LOCAL ** 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.
Re: Appointment tracker
VFPX probably. -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Tue, 11 Aug 2015, at 11:07 AM, Laurie Alvey wrote: Where can I get Kevin Ragsdales's Desktop Alerts? Laurie On 11 August 2015 at 09:27, Paul Newton paul.new...@pegasus.co.uk wrote: +1 for Desktop Alerts -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of José Enrique Llopis Sent: 11 August 2015 09:16 To: profoxt...@leafe.com Subject: RE: Appointment tracker I use a com object, a dll, and Kevin Ragsdale desktop alerts, works very well and do not slows the main program. Pepe Llopis -Mensaje original- De: ProFox [mailto:profox-boun...@leafe.com] En nombre de Allen Enviado el: martes, 11 de agosto de 2015 10:02 Para: profox@leafe.com Asunto: RE: Appointment tracker What about a dll? That doesn't have a UI Al -Original Message- I would agree with Ted. Visual FoxPro is not the best choice for a service EXE as it is hard to make one that doesn't present any UI, and you can't build one natively. Also if there is scheduling involved then you are re-inventing the scheduling wheel too. .NET can create services easily, however for any sort of complex scheduling you're looking at a library called Quartz.NET. As Ted says, do a VFP exe that does what you want once, then exits. Then use the power of the Windows scheduler to run it as needed. There is no real need for this to be a service, or TSR as they used to be called in the olden days. [excessive quoting removed by server] ___ 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/1439288181.186383.353182601.2ae9a...@webmail.messagingengine.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.
RE: VFP9SP2 pop-up box for nearly everything
On 2015-08-11 04:41, Dave Crozier wrote: Mike, I'd also give the line: llOK = this.ExecuteSQL(lcSQL) = 1 a look as I think the this could cause you problems if the ExecuteSQL is returning back a boolean value Personally, even though I use it occasionally I am not a fan of in line assignments and would split it up into two separate assignments. In fact VFP seems to return weird results when comparing Boolean values to integer values, Try the following: ncount=9 ? ,(ncount=9), And then ncount=.T. ? ,(ncount=9), Look at the output the second ? returns back nothing after the initial Hi Dave! ExecuteSQL is my function that does the SQLEXEC and returns an integer. ___ 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/63abbf523725f7ae40a878e9bc5bb...@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.
[NF] Win10-8-7 comparison
Get a heads up on performance differences between all 3 OS. http://www.techspot.com/review/1042-windows-10-vs-windows-8-vs-windows-7/ -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ 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/CAJidMYKn10pdoWepUx0zCPOA1rKmSKudHmh0vytqqJ5Dz=e...@mail.gmail.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.