There are lots of ways to do this. If you don't mind moving the record pointer in that table:
LOCATE FOR NOT knjizeno
IF FOUND()
* Don't allow the user to continue
ENDIF
or:
COUNT TO nFalse FOR NOT knjizeno
IF nFalse > 0
* Don't allow the user to continue
ENDIF
You could also use a...
Just pointing out a minor typo in Mike's code that would give you trouble in a cut-and-paste. Should be:
loWord = CREATEOBJECT("word.application")
Tamar
I don't think you can check the enabled status of a control in FoxPro 2.6. That said, I haven't had to write FP2.6 code for 25 years or so, so maybe I've just forgotten.
Tamar
The point is that it's the user's computer and the user should be able to control that stuff. Most essentially, when a user has some visual impairment (including color blindness, which is pretty common), they MUST be able to override the programmer's choices, or the application may be unusable...
I do NOT recommend using separate IDX files to keep the CDX small. IDXs are not updated when you modify the data unless you explicitly open them beforehand. The addition of the CDX (in FoxPro 2.0, I think) was a great change, as it reduced the chance of indexes getting out of sync dramatically...
I just want to point out that you should not use a macro in this query. A name expression is faster and, more importantly, works even if the file name/path contains any spaces. (I know that's not an issue the way you're doing it, but make it a habit to use name expressions rather than macros...
Chris had a small typo in one of his links. It should be https://github.com/VFPX/nfJson.
I think you'll find that tool lets you convert JSON to a cursor very easily.
Tamar
I cannot urge everyone strongly enough to use the Toolbox rather than the Form Controls toolbar. It makes all this stuff so much easier.
I wrote about it here: http://tomorrowssolutionsllc.com/ConferenceSessions/Making%20the%20Most%20of%20the%20Toolbox.pdf
and here...
I just want to add to Chriss's detailed answer that anytime you want to break up something that's regular, try ALINES() first. So, for example, if you have a line of data separated by commas, use ALINES() and specify "," as the separator. There are times you need StrExtract() because you're...
Just want to add that putting controls inside containers is way easier if you use the Toolbox instead of the toolbar. (In my view, pretty much everything about constructing forms is easier with the Toolbox.)
I've written about this...
Filip, your mentor is wrong here. If there is any possibility that more than one person will be using this application at the same time, finding the largest value and incrementing it is dangerous, because two people could do that at the same time, and you'd end up with two records with the same...
Beyond the unexpected behavior with GetWordCount()/GetWordNum(), ALINES() is faster. It doesn't matter much when the data is small, but the larger the string you pass, the larger the difference.
ALINES() is simply wickedly fast, regardless of what you hand it, while pretty much every other way...
Just want to go back to your original question. I've written a little set of tools for playing with what's in a project and it has the ability to tell you what files in your folder structure aren't part of the project. I've written about it a couple of times; one that includes the code for...
You can't do this with just SQL in VFP. It doesn't have a way to consolidate that data. So you'll need to run the query and then use some Xbase code to loop through and consolidate. I wrote about that here...
Assuming you're talking about using automation from VFP to create a chart in Excel, check out Excel's AddChart method:
https://learn.microsoft.com/en-us/office/vba/api/project.shapes.addchart
Tamar
What is curReplications? Is that a local table/cursor in VFP or something on the server? You can't use a VFP table or cursor in a query you're sending to the server.
Tamar
Thanks for the feedback, @SitesMasstec. I just took a quick look and I see that in introducing concepts early in the paper, I failed to make the point that VFP doesn't require a DBC for you to still consider your set of tables to be a database or that almost everything in the paper applies to...
Looks like the others have all sorted out your questions. I am curious what I wrote that misled you to think that CDXs were only for tables in databases (so I can say it more clearly the next time, or even fix the paper, if that's appropriate).
Tamar
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.