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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. brigmar

    Use a separate file, file type or other method to access nearly 29 million addresses

    ...which file you have open, so that if the index points you to the same table again, you can skip the unload/load cycle. So, a search runs like: * If no hit in INDEX01 : Invalid Postcode * If hit, then Load the POSTCODExx table the index tells you to, and SELECT records with matching...
  2. brigmar

    Using COPY TO with a destination

    SELECT myTable COPY TO a:\myDirectory\mySubDirectory\myTable or SELECT myTable COPY TO ("a:\myDirectory\mySubDirectory\"+ALIAS())
  3. brigmar

    Load Excel file to Grid or cursor to analyze (without knowing anything about the fields)

    Check this thread : thread184-1633357 I follow these steps Use oledb to import to a cursor of memo fields. calculate the max used length of each field(n). if it is less than 255, then alter the field type to a C(n) for each field, find the first non-empty data, most often than not, that is a...
  4. brigmar

    The MIN

    ...cursor s1 Select yt.hgroup,min(yt.id) as id from yourtable yt inner join s1 on yt.hgroup=s1.hgroup and yt.level=s1.level group by 1 into cursor s2 Select * from yourtable where id in (select id from s2) into cursor s3 The cursor s3 now contains the lowest id for the lowest level for each...
  5. brigmar

    What is the best way to analyze profitability of related, but separate transactions?

    Based on a minimal number of fields: salestk, profit, tradeinstk SELECT salestk as rootstk,* FROM deals INTO CURSOR temp1 READWRITE DO WHILE _TALLY>0 UPDATE t1 SET t1.rootstk=t2.rootstk from temp1 t1 inner join temp1 t2 on t1.salestk=t2.tradeinstk AND t2.rootstk!=t1.rootstk ENDDO SELECT...
  6. brigmar

    Invalid Path error when copying cursor to text file for graphing with MS Graph

    Check out the Microsoft sysinternals utilities. In particular interest are Process Explorer, which will allow you to determine which files a process has open, and psfile which allows you to determine which users have files open. This may not help if the culprit is anti virus software, as I have...
  7. brigmar

    Excel automation

    If all you're looking to do is create 2007 style worksheets, and are not worried about formatting and the other options that OLE automation allows, then take a look at Craig Boyd's posting at sweetpotatosoftware...
  8. brigmar

    download all attachments in outlook inbox

    One thing to be aware of when using the Outlook attachment directory is that the file names will not necessarily match the attachment file names. In the case of the same file name being attached to multiple emails, the name in the attachment directory will have " (x)" where x is between 1 and...
  9. brigmar

    Can this SQL Select run faster?

    I want to say to order the conditions by their probability of hit to make use of logic short-circuiting, but I can't say that the speed increase would be that noticeable.
  10. brigmar

    How to find a filename with extension dwg in a server that has a few shared folders

    ...the folder name that is between( yourdrawingnumber, min, max) Use FILE() to check for the existence of yourdrawingnumber.dwg in that folder If it exists, save the full name to a results table Next mapped drive This assumes that: * no file is incorrectly placed * the folders are not nested
  11. brigmar

    A different take on exporting to Excel

    ...of exporting: Using Excel 2007's own 'Import Data' functionality. So the process is : 1. Create DBF file 2. Automate Excel to Import that DBF *----------------------------------------------------------------------------------------- cFullName = "Q:\directory\export.dbf" && DBF File to...
  12. brigmar

    RECNO_OF_INDEX()

    "I before E, except after C", is supposed to be used only for the long 'ee' sound. believe, retrieve receipt, deceive, receive It's not supposed to apply to the 'eye/aye' sounds. height, neighbour There are still exceptions: either, neither (although they can also be pronounced with as 'eye')
  13. brigmar

    How to save Excel 2010 with Memo fields

    Yes you can use Excel automation, but the speed of running that code is prohibitive when compared to OLEDB/XML Try running that on a sheet with 50 columns and 150,000 rows.
  14. brigmar

    How to save Excel 2010 with Memo fields

    Unfortunately, there are some characters that are valid in excel sheet names that are not valid as an oledb table name. Rather than try to translate between the two different sets of legal characters we use automation to rename the sheets to translate1, translate2, etc. before the actual...
  15. brigmar

    Format Date represent the Month and year in Visual Foxpro

    ldDate=DATE() && assign a date lcOutText=CMONTH(m.ldDate)+" "+TRANSFORM(YEAR(m.ldDate)) ? m.lcOutText If you just want the shortened month name, use LEFT( CMONTH( m.ldDate), 3)
  16. brigmar

    Decode Base64 String in VFP6

    Weird that the author would use the basechars string to encode, but not to decode (using AT())
  17. brigmar

    Decode Base64 String in VFP6

    I don't know the base64 specs, but: + = CHR(43), so ch = 43 This falls through the nested IIFs, assigning -1 to q, which appears to be a terminator. The function is expecting the terminator to be the '=' character (ASCII 61). Any other character just forces the function to return an empty...
  18. brigmar

    Trapping an Excel import error

    ...cursor without errors, then append to the main table. llOK = .T. TRY SELECT tempcursor APPEND FROM (lcXLSFile) XLS CATCH to oError llOK = .F. ENDTRY IF m.llOK *!* import from tempcursor to main table ELSE *!* There was an error importing to the tempcursor...
  19. brigmar

    count for different values in a field

    RECCOUNT(), not RECNO()
  20. brigmar

    Print Inverse Text - Black Background, White Letters

    Just had flashbacks to my teenage years... Yes those are Epson control codes. http://www.atariarchives.org/epson/appendix_b.php I don't recall "invert" as being a control code. When I did it, I set the printer to graphics mode and set the bytes by hand. Have you tried another method such as...

Part and Inventory Search

Back
Top