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 Chris Miller 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. cbasoz

    Extract from string

    http://www.foxite.com/archives/0000282024.htm Cetin Basoz MS Foxpro MVP, MCP
  2. cbasoz

    Low Level File Functions

    But although that saying goes a lot in VFP community it is also true for many other languages, like for all the .Net based languages - and they are a lot in count:) To be honest, a task like this would be easier in a .Net language like F#/C# (especially using the ultimate powerful integrated...
  3. cbasoz

    Low Level File Functions

    You move with fseek() and read the lines with fgets(). However, what you are describing is best done with "append from" as MrDataGuy said already. I jumped in to point out you can add a 'for' clause to append from to 'skip' the records if you have some criteria. ie:If you had a text file like...
  4. cbasoz

    How to show a missing browse window.

    Using a grid is the way to go IMHO. You could as well use a browse as a grid. If you set your form's (the one that hosts the grid) Desktop property to .t. then you would get a floating modal form. That may be more appropriate to use. ie: *BrowseForm.prg LPARAMETERS tcAlias LOCAL loForm loForm =...
  5. cbasoz

    help with substring()

    If you meant 'T:' is constant at all times and share root might have changed then still the code I provided applies. Simply change the SQL: Local Array laMapInfo[1] Select MapDrive, MapPath ; FROM MappedDrives ; WHERE MapDrive = 'T:' ; INTO Array laMapInfo Cetin Basoz MS Foxpro MVP, MCP
  6. cbasoz

    help with substring()

    Coldan, As I understand you don't understand the code. That code does exactly what you ask for. You are saying that you would use 'T:\' for '\\NASSERVER209\MYUSERDATA\' and that code instead of using such hard coded values querying for the UNC mapping. Although it is not the proper way to do...
  7. cbasoz

    Cleaning up a project's folder.

    Actually, instead of comparing and erasing I would programmatically create a new 'project backup' folder and copy all the files that are part of the project there with the same folder structure. This is especially important if like me you are having multiple projects in a single folder (finding...
  8. cbasoz

    Cleaning up a project's folder.

    You can get a list of the files used in the project either using code like: For Each loFile In _vfp.ActiveProject.Files ? loFile.Name endfor or with an SQL against pjx: set deleted on select name from myProject.pjx into cursor projectFiles nofilter use in 'myProject' select projectFiles...
  9. cbasoz

    help with substring()

    Local lcPath, lcLocalPath lcPath = '\\NASSERVER209\MYUSERDATA\EXHIBITS\COLDAN\GENIW0015.JPG' GetMappedDrives('MappedDrives') Local Array laMapInfo[1] Select MapDrive, MapPath ; FROM MappedDrives ; WHERE Lower(m.lcPath) Like Lower(MapPath)+'%' ; INTO Array laMapInfo If (_Tally > 0)...
  10. cbasoz

    Speeding up processes

    If you have to live with 'set filter' than at least hoping you are using VFP9 (in that Set Filter performs much better than it was before). Create your indexes that match to your filters as much as possible (your search expression and index signatures must match). ie: index on upper(LastName-('...
  11. cbasoz

    Speeding up processes

    Almost each of those questions deserve a separate discussion. At least the general consensus is do not use 'set filter' (especially if you are using a grid). Instead you may use 'set key' or an SQL. 'Set key' is the fastest way for a grid where it is applicable. Do not create too much indexes...
  12. cbasoz

    Math Calculation Help... Working with stripping Minutes

    You are all wrong guys (including me)! Or am I a ghost and nobody see my posts? For example I had this: int( Duration ) && hours int( Duration * 60 ) % 60 && minutes Huh where is that damn MOD in this code. If I were yet another Obiwan I might have known that I should use MOD() instead of %...
  13. cbasoz

    Math Calculation Help... Working with stripping Minutes

    I am not sure if this what you are trying to do: *Divide min by 60 to get hour - min but then we need * to round by billable rounding rules * 8-22 = .25 * 23-37 = .5 * 38-52 = .75 * 53-67 = 1 Create Cursor myTimes (timeID i Autoinc, tInHours Y, tInMinutes Y) Insert Into myTimes (tInMinutes)...
  14. cbasoz

    Math Calculation Help... Working with stripping Minutes

    Or this? int( Duration ) && hours int( Duration * 60 ) % 60 && minutes Cetin Basoz MS Foxpro MVP, MCP
  15. cbasoz

    Math Calculation Help... Working with stripping Minutes

    Is this what you mean? TRANSFORM(RIGHT(TTOC(CTOT('0')+1.23*3600,1),6),'@r 99:99:99') Cetin Basoz MS Foxpro MVP, MCP
  16. cbasoz

    Finding 'root' of a path

    parentFolder = FULLPATH(ADDBS(mysearchpath)+'..\') Cetin Basoz MS Foxpro MVP, MCP
  17. cbasoz

    Synchronizing two grids on the same table

    You can download public domain version of MultiSelectGrid from http://www.universalthread.com/ViewPageNewDownload.aspx?Session=426D38797569522B472B513D202B362B544945496B57626A2F4E7442544B444B766F413D3D That would provide a grid with multi selection of rows enabled. You are free to modify its...
  18. cbasoz

    scx form name at run tim

    sys(1271) would return that info but in your case as I understand your form is not based on a scx at all. Cetin Basoz MS Foxpro MVP, MCP
  19. cbasoz

    Fill Command

    Here is a sample code that shows one of the problems: Clear * Test Data yarat - Create test data lnHandle = Sqlstringconnect('Driver={SQL Native Client};Server=.\SQLExpress;Trusted_Connection=yes') CursorSetProp("MapBinary",.T.,0) TEXT TO lcCreate noshow IF NOT EXISTS ( SELECT name...
  20. cbasoz

    Fill Command

    Olaf, Wrong, the problems are not related to the SQL server drivers. Those SQL server drivers work just as they should with other tools/languages (say VB, Jscript ...). It is VFP that cannot handle new datatypes of MSSQL when used with an ODBC driver. Mike, The problem is with new datatypes. If...

Part and Inventory Search

Back
Top