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...
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...
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 =...
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
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...
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...
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...
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)...
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-('...
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...
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 %...
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)...
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...
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...
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...
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.