...numbers and different values for SET DECIMALS, I've found something "funny".
According to VFP (6.0, 7.0, 9.0)
SET DECIMALS TO 7
? 4981.1 * 100000 && 498110000.0000001
or
SET DECIMALS TO 2
? 4981.1 * 100000000000 && 498110000000000.10
Maybe someone made a mistake in a math library...
To extend my answer, if you show the data in lets say MyGrid in columns AccountColumn, AmountColumn and PercentColumn (this one is an additional one), simply do:
In the Form.MyGrid.AmountColumn.Text1.Valid put:
SUM ALL amount TO lnTotalSum
THISFORM.MyGrid.PercentColumn.Refresh()
Then in the...
Question:
Do you need to store the percentage in the table ?
If it needs to be calculated on-the-fly, then a single change to one row will force you to replace percentage in ALL rows.
If you really need to do it that way, then I believe the fastests way would be:
SELECT mytable
SUM ALL...
...Numeric 3 No
22 SCOPE Numeric 3 No
** Total ** 342
I decided to convert the existing Character fields (marked with Red) into new VarChar fields, which hold...
Ok, found it - and it even fixed my problem with VFP8.
The function is called CREATEBINARY() :)
Thanks for all your help and for pointing me into the right direction :)
And to answer the question. It doesn't work when you add CHR(0) in front/back nor add "0h" to the string (that's the way VFP9 marks a BLOB/VarBinary type)
I believe VFP8 doesn't fully support BLOBs - that's why there is a problem with processing them.
Also - is there a way to FORCE variable to...
I found that the string I was receiving was of VarBinary/BLOB type which is somewhat supported by VFP8 (the code doesn't even work in VFP6).
I did test it with VFP9 Beta and the TYPE() function returned 'Q'.
Well - I found a solution to my problem, but it is EXTREMLY weird!
When I do this:
lcDummyPart = LEFT(gcPublicKey,0) && Add 0 bytes from the Dummy Key
lcGoodKeyPart = SUBSTR(vaPublicKey, 1) && Append it with the good key
gcPublicKeyFinal = lcDummyPart + lcGoodKeyPart
The gcPublicKeyFinal...
Hello All,
I've encountered a weird problem while trying to make a Xceed Encryption Library v1.1 work (an ActiveX dll). I know they say on the web site, that it doesn't support VFP, but I believe there is a way to make it work :)
Anyway, my problem is as follow - in short (and making it...
I've tested in on two different computers, with three different tables - the same result.
Using SEEK ... ORDER ... DESCENDING gives two different results in VFP6 and VFP8.
In VFP6 the table has the index in a descending order (even without using the SET ORDER TO .. DESCENDING to start with)...
Nah,
I did put the same ones :) The window in VFP8 was cut :)
I copy&paste the code I've used in VFP8 into VFP6 and run it
from the Command Window, so the code was identical.
Both ar OFF.
Here are links to two screenshots of the BROWSE window taken in both VFP8 and VFP6.
They show two different results after performing the same operation on them.
VFP6:
http://gothic.sitenet.pl/vfp6.jpg
VFP8:
http://gothic.sitenet.pl/vfp8.jpg
Any ideas what could have been wrong ?
...VFP6, the field county looks as follow:
(I've marked the current record with asterisks)
...
AURORA
AURORA
ARAPAHOE
ALBANY
ALAMEDA
"empty county" *****
"empty county"
"empty county"
...
while VFP8 returned the same values in a different order:
...
"empty county"
"empty county"
"empty...
My fault, I was upset about the not working code and I made a hastly mistake with the help :)
But it doesn't change the fact, that the code didn't work with VFP8. Only the mentioned change had restored its proper behaviour.
So, what was the cause for VFP8 to stop working ?
...to the previous code made it work again ..
scNameFile = "Names_MM"
USE names_MM
SET ORDER TO cty_owner DESCENDING
SELECT (scNameFile)
GO BOTTOM
* Get the first value from table
lcCountyValue = county
* Scan the entire table using INDEX value
DO WHILE .T.
? RECNO()
* Scan in the...
...value), next jumps to the first occurence of this value .. and so on
Here's the code - I've modified it a bit, so it would work as a whole piece:
*** CODE STARTS HERE ***
scNameFile = "Names_MM"
USE names_MM
SET ORDER TO cty_owner
SELECT (scNameFile)
GO TOP
* Get the first value from...
Brian,
so why does the INDEX ON county TAG county works fine ?
I know that the VFP has to perform more operations while using concatenated indexes, but I wouldn't suspect it takes that much time.
According to Special Edition Using VFP 6...
Ramani,
still slow :( it took 1.5 minutes to find a little bit over 50k records.
Here's the real code I use:
* First, close all open tables
CLOSE TABLES ALL
* Open the table we're using for testing
USE c:\tmp\test001.dbf
* Use the concatenated index (County + OwnerLName)
SET ORDER TO...
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.