OR:
SELECT <TableB>
INDEX ON OtherField + OtherField2 TAG PKey
UPDATE <TableA> ;
SET <TableA>.NewField = <TableB>.Converted_Field ;
WHERE INDEXSEEK(<TableA>[/I].OtherField + <TableA>.OtherField2, .T., <TableB>, "PKey")
*** Table B is still selected
DELETE TAG PKey && this is...
<<list box contains 't', 'y', 'x'
sql statement -
select * from table where col1='t' or col1='y' or col1='x'
>>
I'm not sure what you want. Your example implies
SELECT * ;
FROM MyTable ;
WHERE Col1 IN("T", "Y", "X") ;
INTO CURSOR MyResults
which is...
Steve,
<<#DEFINE and #INCLUDE... Can these commands be used in a Form or Class?>>
Yes. To INCLUDE a file in a form or class, via the main menu:
>Form(or Class)>Include File...
Put the properly pathed include file in the dialog box.
The include file will be available throughout the...
Weedz,
<<MAX_AMOUNT_1000 is easier to read than 1000 when found in code.>>
It's also easier to institute a global change. If you've got
#DEFINE dnMaxAmount 1000
in several places in a piece of code and someday the "max amount" goes to say 1250, you'll only have to change that...
You're working too hard... Don't PACK until you exit the app. As long as DELETE is SET ON, the deleted records will not be visibile... and I'm not just talking about the screen. Queries, seeks, etc. will not be able to "see" the deleted records. Also, repeated PACKs slow down the...
One other thing... about NODEFAULT:
From the VFP help DEFINE CLASS:
"NODEFAULT
Prevents Visual FoxPro from performing its default event or method processing for Visual FoxPro events and methods. For example, if the KeyPress event occurs, including NODEFAULT in the KeyPress procedure or...
DODEFAULT and the scope resolution operator (aka "::")
This is NOT a third grade question...
DODEFAULT() means "run the code in the parent version of this class".
You need this when a subclass has *any* code in the event/method.
For example, say you had a command button...
One more point.
As a rule of thumb, I try to keep processing code in a seperate method and keep interface-related code as clean as possible:
PROCEDURE Click
DODEFAULT()
THISFORM.CountImageHits(.T.)
RETURN
*********************
METHOD CountImageHits && in THISFORM
LPARAMETERS...
<<Are #DEFINE's treated as "Public", if they are included in the .H file, and called during your system setup?>>
No. #DEFINES and #INCLUDES only have "scope" in the physical file that they are part of. This is because they're not memvars... they are preprocessor...
<<However, now it doesn't sort the results...>>
Bizarre. Ordering the result set is an intrinsic characteristic of a GROUP BY clause. Something else is going on here.
<<I tried "SET DELETED OFF" and that fixed the problem of speed...the query runs in about 0.17 seconds...in my EXE...
Scott,
<<I've acquired two books, "Using Visual Foxpro 6" from Que, and "Visual FoxPro 6 Enterprise Development"... >>
I've got both of those books. "Using Visual FoxPro 6" is a pretty good reference.
"Visual FoxPro 6 Enterprise Development" *looks*...
<<In my Fox2.6 days, I had a lengthy file alled "COMMON.PRG", which I would set with the SET PROCEDURE TO <proc> in fox.
This had all my handy-dandy UDF's that I'd call, as well as my ERROR Handler, and SYSTEM INITIALIZATIONs.
As I get deeper into VFP, I find that I can now put those...
I'll add to the growing sentiment: You probably don't need to put your tables into a DBC.
Pro DBC:
1) Aids referential integrity.
2) Facilitates development of a new database (highly debatable)
Con DBC:
1) Adds complexity.
2) Reduces flexiblity. The headers of the individual tables are...
>>I have made a form and added it to a project. The VCR buttons work fine and browse the table just right, however when I use the .exe outside of the Foxpro environment the browse button does not work at all, and when it is pushed it corrupts the exit button. However when the exit button is used...
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.