Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ThomC

  1. ThomC

    Searching a character field for a character string

    Even more flexible is the ATC() function. This variation of AT() is case INsensitive, which can save a lot of headaches. Regards, Thom C.
  2. ThomC

    FoxPro Database Updates

    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>, &quot;PKey&quot;) *** Table B is still selected DELETE TAG PKey && this is...
  3. ThomC

    Dynamically building an SQL statement

    <<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(&quot;T&quot;, &quot;Y&quot;, &quot;X&quot;) ; INTO CURSOR MyResults which is...
  4. ThomC

    #DEFINE &amp; Global Variables

    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...
  5. ThomC

    #DEFINE &amp; Global Variables

    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 &quot;max amount&quot; goes to say 1250, you'll only have to change that...
  6. ThomC

    Accessing cursors after Delete

    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 &quot;see&quot; the deleted records. Also, repeated PACKs slow down the...
  7. ThomC

    DODEFAULT() vs :: Scope Resolution

    One other thing... about NODEFAULT: From the VFP help DEFINE CLASS: &quot;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...
  8. ThomC

    DODEFAULT() vs :: Scope Resolution

    DODEFAULT and the scope resolution operator (aka &quot;::&quot;) This is NOT a third grade question... DODEFAULT() means &quot;run the code in the parent version of this class&quot;. You need this when a subclass has *any* code in the event/method. For example, say you had a command button...
  9. ThomC

    Variable Creation. (I'm sure this will be the dumbest question...)

    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...
  10. ThomC

    #DEFINE &amp; Global Variables

    <<Are #DEFINE's treated as &quot;Public&quot;, if they are included in the .H file, and called during your system setup?>> No. #DEFINES and #INCLUDES only have &quot;scope&quot; in the physical file that they are part of. This is because they're not memvars... they are preprocessor...
  11. ThomC

    Optimizing my SQL SELECT statement

    <<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 &quot;SET DELETED OFF&quot; and that fixed the problem of speed...the query runs in about 0.17 seconds...in my EXE...
  12. ThomC

    Database Theory questions (Part 2)

    Scott, <<I've acquired two books, &quot;Using Visual Foxpro 6&quot; from Que, and &quot;Visual FoxPro 6 Enterprise Development&quot;... >> I've got both of those books. &quot;Using Visual FoxPro 6&quot; is a pretty good reference. &quot;Visual FoxPro 6 Enterprise Development&quot; *looks*...
  13. ThomC

    Common Procedure file vs. Common Class File

    <<In my Fox2.6 days, I had a lengthy file alled &quot;COMMON.PRG&quot;, 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...
  14. ThomC

    Database Theory Questions

    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...
  15. ThomC

    Browse Button

    >>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...

Part and Inventory Search

Back
Top