Re-applying filter ..
I have come across a particular problem may be someone else here as also
encountered it.
I have applied a FILTER condition on a table & then changed the value of a
field - which is part of the Filter Expression - which causes some more
records to meet the filter condition and hence are desired to be filtered
out.
But I am surprised that when all the records meet the Criteria as set in the
FILTER Expression it works fine but when some records are already being left
out - coz of the FILTER Expression - and some more are added to the list the
records don't respect the filter condition.
I am moving the Record Pointer in both the cases. After applying and/or
changing the Data.
Is there any method other than to
1: save the Filter,
2: setting Filter Off and then
3: Reapplying the Filter Condition.
which forces the Foxpro to refresh/reapply the filter to the table.
TIA
Tanveer Tag: Count number of character Tag: 197978
Disabling drive write ahead caching
Is there a way to disable main disk drive write ahead caching
from within VFP? Registry key or something.
-----------------------------------------------------------------
Paul Lee ........... Abri Technologies ......... http://abri.com/
'Recover' - top rated FoxPro file repair utility.
----------------------------------------------------------------- Tag: Count number of character Tag: 197974
Tableupdate() function
I have a remote view set up to a SQL server database. In the view
definition, I have set up the where clause to indicate SQL fieldonly in the
update criteria. The bufferring is set to Optimistic Record lock (#3). The
table itself has a field ID that is set to autoincrement. If I append a
record and issue the tableupdate() command, I am unable to make any other
changes to that record due to update conflict.
Thus the following code :
..
Append blank
replace fname with "Jim"
=Tableupdate()
replace lname with "marck"
=tableupdate() && <-- this produces a update conflict due to the field ID.
The question is this. Is the only way around this problem to issue a
=Requery() after the first tableupdate(), or is there a better way to do
this.
Any suggestion is appreciated.
Thanks
Shahriar Tag: Count number of character Tag: 197971
How to set the default Report Preview window size
Everytime the preview windows of Report come out, I cannot control the
windows size.
I want it to be maximize.
But every report has each setting now.
How can I control the size of the preview window. Tag: Count number of character Tag: 197969
ative VFP tables vs Remote views
We have a LAN with W2k server and W2k workstations. My VFP database is
located in the W2k server. My concern is to access data as fast as possible.
I created a local view to retrieve and update records in 2 tables. When I run
the local view, in the data-session window I can see 3 tables open,
view(cursor) and the 2 tables.
Then I created a remote view using a connection string in which I used
Microsoft Visual Foxpro ODBC Driver. Interestingly, When I run the remote
view, in the data-session only the view(cursor) is open.
Therefore, is it a good idea to use remote views in this way in my forms as
the overhead of opening the native tables on the user's workstation is
eliminated?
Your comment is greatly appreciated. Tag: Count number of character Tag: 197968
security problem
hi ,
hi i'm using VFP8 SP1 and CrystalRpt for my report , is there any chance to
encrypt my data but i can read with CR in multiple user App
acctualy i'm thinking about cursor to solve this
but is there any other possibility
thank's Tag: Count number of character Tag: 197967
VFP9B C0000005
One more example of C0000005 erorr in VFP9B
close all
clear all
set safety off
create database dtest
create table test (f1 N(1,0))
m.vOrder="0"
create sql view vtest as select * from test order by &?vOrder
use vtest
In VFP6SP5 this works without any error
Leonid Tag: Count number of character Tag: 197960
using SQL pass through for large inserts
Hi,
More than one records can be retrived from back end (SQL Server) to local
VFP cursor using SPT, e.g. SQLEXEC(nCon, 'SELECT * FROM Patients',
'curPatients'). However for inserting whole VFP cursor/table in back end I
have to do one by one in a SCAN...ENDSCAN loop e.g. SQLEXE(nCon, 'INSERT
INTO Patient (Field1, Field2) VALUES (Value1, Value2)').
Source data (VFP) is large therefore is there a way to INSERT a whole VFP
cursor/table using SPT in one command?
Other option would be to leave SPT and use Remote views. Ideas ?
TIA
Kamran Tag: Count number of character Tag: 197954
foxpro help is lock
hi
i'm using VFP8 SP1 , when i try to open foxpro help with f1 , it will
display a help page , but when i click the [sub]categories , it's lock me
up
so i split with HTML Help Wshop , and it's very painfull for me
anybody could tell me why i can't see foxhelp with the normal way ?
thank's
christ Tag: Count number of character Tag: 197935
Where is screen font setting stored?
Does anyone know where the VFP desktop (_Screen.FontName) is stored? Mine
keeps resetting to Arial, no matter how many times I set it to my preferred
FoxFont. I'm suspecting a program I'm working on is doing it, and I'm
curious as to where VFP actually stores this setting. Tag: Count number of character Tag: 197934
Add column to 1 dimensional array.
I haven't written any VFP for a while. Isn't there an easy way to add a
column to a single dimensional array so that the vals in the first col are
preserved? ains() seems to work only if there's more than a single col to
begin with.
-Lew Tag: Count number of character Tag: 197929
Unicode Application
I have making application supporting Big5 for a long time. But now I want to
build an application supporting Unicode. How can I do so ? Tag: Count number of character Tag: 197921
VFP 6 and second language - nothing visible in command window
Yesterday I installed Hebrew language support on my XP,
patched-to-the-latest, machine. Now, when I type in the command window,
I see absolutely nothing, although what I type works and nothing else
that I've yet noticed doesn't function, e.g., I have a short program I
run daily that puts up a BROWSE NOWAIT window and the browse window,
while different looking, is still readable.
What happened and what do I do to fix it? This iv VFP SP5, version
06.00.8961.00
TIA.
-S- Tag: Count number of character Tag: 197914
Creating DLL
I dont know anything about DLL files. Can any i guide us what it does. & how
to create the DLL files. Tag: Count number of character Tag: 197912
VFP stability
I have a client with our compiled VFP8 SP1 application (one of many) who is
having freezing problems on a number of machines at their site.
Many other sites that we have have no problem.
I have done the usual bit with anti virus, reinstalling the latest VFP
patches, uninstalling an reinstalling our software etc. but they continue
to freeze up the computer regularly.
Any ideas on what I can suggest to them next?
Cheers
David Younger Tag: Count number of character Tag: 197907
Creating a VFP report on the fly from a web page.
I have an ASP application that uses a VFP compiled DLL to interract with our
VFP backend.
I would like the users to be able to display an invoice on the screenthat
looks exactly like their real invoices (which come out of VFP).
I am trying not to use Crystal as the users would have already customised
the invoices themselves outside of our control and I relaly dont want to
have to teach them how to redo it in crystal.
I have created a method in our DLL that generates a PDF file without any
messages, forms or other human interface features. However the one thing I
want which is to generate a report is rejected by the COM DLL.
Is there a way to get a VFP compiled DLL to generate repot using the REPORT
FORM comman or some other strategy to generate a report from an FRX file?
Cheers
David Younger Tag: Count number of character Tag: 197906
VFP 8 - Hasp Dongle
I have a database project in Visual Fox Pro 8 where it is proposed to have a
hasp dongle as a security to avoid the package being copied and installed at
multiple locations.
Has anyone used HASP Dongles with VFP 8? Sample Code for its integration
into the project (especially for the loading of the DLL) would be great as
it would save a lot of time experimenting. We are looking at the Hasp M1
model
Many Thanks in Advance
Mahmud Abdulla Tag: Count number of character Tag: 197904
XML attributes into cursor
I need to pull both data and attributes into a VFP cursor. XMLTOCURSOR works
fine with this XML:
<item code="xyz">
<data date="20040805">AAAAAA</data>
</item>
but the cursor only contains the field "data" with the value "AAAAAA". I
need to also includes the "code" field and the "date" field into the cursor.
Is this possible either with XMLTOCURSOR or XMLAdapter?
--
seeker Tag: Count number of character Tag: 197891
Windows XP SP2 & VFP 8
Has anyone tested Visual Foxpro 8 with Windows XP Service Pack 2? If so,
were there any problems?
thanks
Mike Tag: Count number of character Tag: 197879
Implementing quickfill combobox in grid
Hi I'm having problems with implementing a quick fill combobox in a GRID
It works very well outside a grid but not in.
Outside a grid interactivechange get triggered and calls a custom method called IsKeyHandled
IsKeyHanlded does the work of finding the first mathing item and setting values for .SelStart and .SelLen
The problem is that in a grid you have to use the KeyPress method in order to implement the quick fill.
So KeyPress calls IsKeyHandled with still works well but when the process exits the values of .SelStart and .SelLen get reset to zero.
What is the problem?
Here is the code
DEFINE CLASS i_cboovtmautoadding AS i_combobox
DisplayValue = ""
IncrementalSearch = .T.
acstyle = 2
lastsellength = 0
lastselstart = 0
Name = "i_cboovtmautoadding"
lastdisplayvalue = .F.
ovtm = .F.
ldroppeddown = .F.
nolddblclick = .F.
DIMENSION asourcerows[1]
PROCEDURE ovtm_access
WITH ThisForm
IF VARTYPE(.oVTM) = "O"
RETURN .oVTM
ELSE
RETURN goApp.cusVirtualTableManager
ENDIF
ENDWITH
ENDPROC
PROCEDURE iskeyhandled
LPARAMETERS lnKeyCode, lnShiftAltCtrl, llInGrid
LOCAL lnSelStart, lnRow, llKeyHandled
llKeyHandled = .T.
WITH This
*** Handle the printable characters
DO CASE
CASE BETWEEN(lnKeyCode, 32, 126) AND NOT BETWEEN(lnKeyCode, 49, 57)
lnSelStart = IIF(llInGrid, .SelStart + 1, .SelStart)
*** Get the value typed in so far
.DisplayValue = IIF(lnSelStart > 1, .DisplayValue, "")
lcSofar = LEFT(.DisplayValue, lnSelStart-1) + CHR(lnKeyCode)
*** Find a match in column #1 of the combo's internal list
FOR lnRow = 1 TO .ListCount
IF UPPER(.List[lnRow, 1]) = UPPER(lcSoFar)
.ListIndex = lnRow
llFound = .T.
EXIT
ENDIF
ENDFOR
IF NOT llFound
.DisplayValue = lcSofar
ENDIF
*** Highlight the portion of the value after the insertion point
.SelStart = LEN(lcSofar)
.SelLength = MAX(LEN( ALLTRIM( .DisplayValue ) ) - .SelStart, 0)
CASE llInGrid AND lnKeyCode = 19
.SelStart = MAX(.SelStart - 1, 0)
CASE llInGrid AND lnKeyCode = 4
.SelStart = MIN(.SelStart + 1, LEN(ALLTRIM(.DisplayValue)))
OTHERWISE
llKeyHandled = .F.
ENDCASE
ENDWITH
RETURN llKeyHandled
ENDPROC
PROCEDURE getvalue
LPARAMETERS lvKeyCode
LOCAL lvValue
lvValue = ""
WITH This
liItem = ASCAN(.aSourceRows, lvKeyCode, 1, ALEN(.aSourceRows, 1), ALEN(.aSourceRows, 2) - 2, 9)
IF liItem > 0
lvValue = .aSourceRows(liItem, 1)
ENDIF
ENDWITH
RETURN lvValue
ENDPROC
PROCEDURE GotFocus
*** Save Original value in case we have to restore it later
WITH This
*.uOriginalValue = .Value
.nOldDblClick = _DBLCLICK
_DBLCLICK = 1.5
ENDWITH
ENDPROC
PROCEDURE Valid
WITH This
IF NOT EMPTY(.DisplayValue)
IF ASCAN(.aSourceRows, .DisplayValue, 1, ALEN(.aSourceRows, 1), 1) = 0
liAnswer = Messagebox("This value was not found," + CHR(13) + ;
"Do you want to add it?",36,"")
IF liAnswer = 6
.oVTM.NewRecord(.cSourceTable, .DisplayValue)
.Requery()
.DisplayValue = .DisplayValue
ELSE
.DisplayValue = ""
ENDIF
ENDIF
ENDIF
ENDWITH
ENDPROC
PROCEDURE Requery
LOCAL laTableCursor(1), llSuccess
WITH This
IF .oVTM.GetViewArray(@laTableCursor, .cSourceTable) AND ALEN(laTableCursor) > 1
DIMENSION .aSourceRows(ALEN(laTableCursor, 1), ALEN(laTableCursor, 2))
ACOPY(laTableCursor, .aSourceRows)
llSuccess = .T.
ELSE
DIMENSION .aSourceRows(1, 1)
llSuccess = .F.
ENDIF
ENDWITH
RETURN llSuccess
ENDPROC
PROCEDURE InteractiveChange
RETURN This.Iskeyhandled(LASTKEY())
ENDPROC
PROCEDURE Init
WITH This
.Style = 0
.BoundTo = .T.
.SelectOnEntry = .F.
.AddProperty("cSourceTable", JUSTSTEM(This.RowSource))
IF EMPTY(.cSourceTable)
.cSourceTable = .oVTM.ListBound(.ControlSource, ThisForm.DataSessionId)
ENDIF
.AddProperty("cSourceFields", JUSTEXT(.cSourceTable))
.cSourceTable = JUSTSTEM(.cSourceTable)
.RowSource = "This.aSourceRows"
.RowSourceType = 5
.ColumnWidths = .oVTM.ColWidthsPix(This, .cSourceTable)
.ColumnCount = .oVTM.GetColCount(.cSourceTable)
.Requery &&... "This.aSourceRows" gets populated
ENDWITH
ENDPROC
PROCEDURE Click
This.lDroppedDown = .F.
ENDPROC
PROCEDURE DropDown
This.lDroppedDown = .T.
ENDPROC
PROCEDURE LostFocus
_DBLCLICK = This.nOldDblClick
ENDPROC
PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
WITH This
IF .Parent.BaseClass = "Column" AND DODEFAULT(nKeyCode, nShiftAltCtrl) AND .IsKeyHandled(nKeyCode, nShiftAltCtrl, .T.)
**IF .Parent.BaseClass = "Column" AND .IsKeyHandled(nKeyCode, nShiftAltCtrl, .T.)
&&... KeyPress processing is only required in grids
NODEFAULT
ENDIF
ENDWITH
ENDPROC
ENDDEFINE Tag: Count number of character Tag: 197849
How to summarize & count
VFP 7.0
I have a data file with 2 datatype fields and 10 numeric fields
I can sum the numeric fields in a report but cannot count where numeric value > 0.00 -- it ignores the statement '> 0.00' & just counts every record
& I cannot get a query to work either!
I really need to export a cross tab to excel looking like this:
data group 1- subgroup1 ---countnumfield1 --- sumnumfield1 ---
countnumfield2 -- sumnumfield2 --- countnumfield3 --sumnumfield3 & so on!
I need to count & sum only where the numericvalue is > 0.00
Thank you big time!
Joe Robison
--
Datamail
Kansas City MO 64114
816-523-0222 Tag: Count number of character Tag: 197848
HP Photosmart 7660 Printer
Hi All,
Printers and their drivers can be such a headache!!!
I have a customer who went out and bought an HP Photosmart 7660
printer to use with his Win98SE machine. When he sets that
printer as the default and runs my application, it immediately
and completely locks up! No Ctrl-Alt-Delete, Nothing!
If he sets a different printer as a default all is well.
Does anyone have a clue on this?
--
Alec Tag: Count number of character Tag: 197847
Dynamic Back/Fore colors
Is there a way to see what a grid has assigned as the dynamic back/fore
colors?
I have an application that loads three tables on separate showwindow=1
forms. The 1st one that loads never shows the dynamic colors but all of the
rest do. It would seem that I am not executing the "setall" to the first
grid, but I stepped through the code and it runs. I am baffled.
Thanks,
Scott Tag: Count number of character Tag: 197845
Store Japanese characters from FoxPro into SQL Server?
Greetings!
I have an application that can happily store and retrieve Japanese
characters into a stand-alone FoxPro database. Now I need to write them
into nvarchar fields in SQL Server tables. SQL Server is expecting them in
Unicode.
I have an edit box into which I can enter Japanese characters through an
input method editor. I haven't been able to figure out how to massage those
characters to get them into Unicode and then into the SQL Server table.
What hoops do I have to jump through?
Thanks!
RobR Tag: Count number of character Tag: 197836
Pack causing intermittant fatal error VFP7 SP1
I originally posted a message about this problem on 12th May. I am beginning to think it may be a problem with the user's PC. As the crash happens during a pack and the file has actually disappeared from it's original place, the fatal error must be happening at the point where VFP deletes the original table from disk and renames the temporary table with the original table name. Where on the user's machine would this temporary table be located? We do not use any Config file. Is it the Windows temporary directory? Could there be a problem with that user's windows temporary directory or permissions to that directory?
Note - the file that is being packed is not particularly big.
Any help would be appreciated.
Bernie. Tag: Count number of character Tag: 197810
Visual SourceSafe with VFP8
I stopped using VSS a long time ago (found it presented many errors) when I
was using VFP6. I didn't have time to sort all of the issues out back then.
Now I am up to VFP8 and would like to get back to using some sort of CVS
system. Will the version of VSS (6?) that I got with Visual Studio 6 work
with VFP8 or should I be looking at an alternative CVS system? Perhaps a
newer version of VSS. Ideally if an alternative one I would like it to be
freeware. But then who wouldn't.
--
Regards
Darren Woodford - MCP, MCSE
Woodford Computer Systems Ltd
http://www.woodfordcomputers.co.uk
http://www.pegasus-opera-ii.co.uk Tag: Count number of character Tag: 197808
FPW2.6a SCAN FOR missing records
Hello,
this is driving me crazy :(
I have a screen that lets the user add/remove multiple items to an assembly.
The items are stored in an array whilst they edit and then stored in the
main table if they save.
The save routine looks like this:
SELECT pri_det
m.arrayref=1
m.arraylen=ALEN(priceinf,1)
SCAN FOR wk_ref = m.ref
IF m.arrayref<=m.arraylen
* already existing record - replace contents
REPLACE pri_det.saparticle WITH RIGHT(priceinf[m.arrayref],6)
m.arrayref=m.arrayref+1
ELSE
* array has fewer records than table - delete record
DELETE
ENDIF
ENDSCAN
* add any remaining records from array to table
DO WHILE m.arraylen>=m.arrayref
INSERT INTO pri_det VALUES (m.ref,RIGHT(priceinf[m.arrayref],6))
m.arrayref=m.arrayref+1
ENDDO
Sometimes when they remove items, this doesn't work correctly and the
SCAN..ENDSCAN doesn't loop all the records in its FOR clause. Does anyone
know WHY!?!!
1) There is no filter set.
2) I've recreated the indexes with INDEX ON. (although I haven't tried a
SCAN.. NOOPTIMIZE yet)
3) I've pulled that routine out into a separate program (working on the same
table) to try to reproduce and it seems to work fine.
4) I wrote a little program that SCANS the same clause just doing an
incremental count to a vraible and then display the result in a wait window.
I used my screen to remove some items and broke the save routine just before
the SCAN. At this point I ran my counting program - it showed a SCAN FOR
wk_ref=m.ref count of 5 records. When then went on to single step the save
routine it only SCANned 3.
What on earth could possibly be wrong here?
--
TIA
Andrew Howell Tag: Count number of character Tag: 197805
How to print image file from VFP report?
Hi all,
I have some problem about VFP7 report. I want to use report to print
the image
that I have scan from the document in tif type but the report ole
image can use only bmp and jpg.Is the vfp7 report can use only this
two type? And when I use BMP file which greater than 1 meg the report
can not run, it is error. How can I do? Thank you for your advise.
Kitty Tag: Count number of character Tag: 197804
Saving Picture in SQL Server
Hi there,
I need to know how can i save picutre in SQL Server table.
I am using VFP 6.0 as front end and SQL Server at back end. I have already tried FILETOSTR() AND STRTOFILE() Function which performs well with Foxpro table but it does not work with SQL Statement as follow;
tmpString=FILETOSTR("Picture.Bmp")
=SQLExec(connHandler,"Insert Into temp (EmpPhoto) Values ('"+tmpString+"')")
It looks String already contains some single quotes which creats ambiguity.
Would be very thankful for any help in this regard.
NR Tag: Count number of character Tag: 197803
Coordinated grids and a lookup textbox
I have 3 grids on a form, a parent(name) & 2 children (phones & emails).
I have the grids set up so that as the user scrolls through the parent grid,
the other 2 grids update themselves appropriately. Now I'm adding a textbox
to serve as a quick look up for names in the parent grid. I do a locate for
.../ if found(), etc... in the interactive change of the textbox and the
parent grid updates itself correctly. Unfortunately, not only do the child
grids NOT update correctly, they no longer track the parent grid if the user
goes back to the parent & begins scrolling again. Calling the respective
refresh methods doesn't seem to work.
What to do? Any ideas?
-Lew Tag: Count number of character Tag: 197802
Check Box in VFOXPRO Always shows that it is ReadOnly
Hello, I am still new to VFoxpro and in need of some advice. I have a new form that I created and I have included some Check boxes. Whenever I RUN the form and try to click on the Checkbox, the message that I see at the bottom left hand side is "The control is Read-Only". How do I get my application/form to not display this message and allow me to click/unclick the checkbox?
Thanks alot, Eddy. Tag: Count number of character Tag: 197799
Making CTRL+A Work in a Listbox
Hi all.
I would like to make CTRL+A work to select all items in a multi-select
listbox. I've run into the problem that the CTRL+A combination won't
register in a KeyPress() event of either a form or a control.
I've come up with the following code that encapsulates a working
solution within a listbox subclass as well as I can figure out. Of
course, I'm aware of problems with using ON KEY LABEL and PUBLIC
variables. If anyone can suggest a better way to do this, that would
be very much appreciated.
TIA,
Ken Dibble
Southern Tier Independence Center
*** CTRL+A LISTBOX DEMO ***
RELEASE ALL
CLEAR ALL
CLEAR
LOCAL oldsafety
oldsafety = SET("SAFETY")
SET SAFETY OFF
PUBLIC oForm
oForm = CREATEOBJECT("Form")
oForm.AddObject("Text1","Textbox")
WITH oForm.Text1
.Top = 5
.Left = 5
.Height = 22
.Width = 100
.Visible = .T.
ENDWITH
oForm.AddObject("List1","MyListbox")
WITH oForm.List1
.Top = 5
.Left = 120
.Visible = .T.
ENDWITH
oForm.Show(1)
IF NOT EMPTY(oldsafety)
SET SAFETY &oldsafety
ENDIF
RELEASE oForm
DEFINE CLASS MyListbox AS ListBox
RowSourceType = 1
RowSource = "ONE,TWO,THREE,FOUR,FIVE"
ColumnCount = 1
ColumnWidths = "80"
MultiSelect = .T.
Height = 150
Width = 100
PROCEDURE Init
ERASE handlectrla.prg
ENDPROC
PROCEDURE GotFocus
THIS.Selected(1) = .T.
THIS.SetupKeyHandler()
ENDPROC
PROCEDURE LostFocus
THIS.ClearKeyHandler()
ENDPROC
PROCEDURE SetupKeyHandler
LOCAL progstr
TEXT TO progstr NOSHOW
FUNCTION HandleCTRLA(oForm)
IF UPPER(oForm.ActiveControl.BaseClass) == "LISTBOX"
oForm.ActiveControl.SelectAllItems()
ENDIF
ENDFUNC
ENDTEXT
STRTOFILE(progstr,"handlectrla.prg",0)
SET PROCEDURE TO handlectrla ADDITIVE
PUBLIC oFormRef
STORE THISFORM TO oFormRef
ON KEY LABEL CTRL+A handlectrla(oFormRef)
ENDPROC
PROCEDURE ClearKeyHandler
oFormRef = .NULL.
RELEASE oFormRef
ON KEY LABEL CTRL+A
ERASE handlectrla.prg
ENDPROC
PROCEDURE SelectAllItems
FOR x = 1 TO THIS.ListCount
THIS.Selected(x) = .T.
ENDFOR
ENDPROC
PROCEDURE Destroy
THIS.ClearKeyHandler()
ENDPROC
ENDDEFINE
*** END CODE *** Tag: Count number of character Tag: 197797
error VFP 8 0: Class definition MSXML2.DOMDOCUMENT.4.0 is not found
Hi,
I had to uninstall VFP8 in order to reinstall VFP6 and then VFP8 again...
however when I finished the Task pane Manager is showing this error message:
0: Class definition MSXML2.DOMDOCUMENT.4.0 is not found
this was not happening the first time I installed VFP8
I already have tried to uninstall both VFP6 and VFP8, and installeng thean
both agaon, but it did not fixed the problem, I also tried unsuccesfully
"Repairing " VFP8
I would appreciate any suggestion
thanks
Oscar Taboada Tag: Count number of character Tag: 197783
vfp 6.0 book
Hi, I'm from the Philippines, the VFP6.0 Programmer's Reference book is no longer available in any book store here, is there anybody who could help me get a book of such? i've tried ordering throught the internet but all prospective agencies/couriers does not deliver in this country. from the last query that i made, they only deliver in Singapore. Pls help, i'm new in vfp OOP, i desperately need this book as reference. Thank you very much and more power. Tag: Count number of character Tag: 197779
Pocket PC and VFP
Hi All,
I have a new project, I want to control inventory using a Pocket PC. I
don't have the time to learn a new programming language. Is there a way to
program an application in Visual FoxPro and run it on a Pocket PC with
Windows CE ?? If not is there another logical solution.
Thanks in advance.
Tanya Tag: Count number of character Tag: 197775
toolbar
Using VFP 6, I use toolbar which is currently docked horizontally at
the top LHS of the screen when forms are opened. I have two questions.
1. Because some buttons are inappropriate for some forms, the init for
those forms calls a method in a class which makes those buttons visible
property = .F.. In some cases, while this works OK otherwise, the
toolbar is no longer horizontal but some buttons appear on a second line
under others and I have to drag the toolbar manually to correct it.
What causes this and how do I fix it ?
2. What I would really like is to have the toolbar docked centrally
under each form which calls it. But as the forms are all different sizes
this means that it needs to be in different places for different forms.
Is there any way to achieve this ?
Thanks
--
Tim Hobson Tag: Count number of character Tag: 197764
"Hidden" files attached to a form?
Hi,
I created an exe w/VFP8(SP1) and sent it to a friend.
When he ran it, he got several messages re. missing files. The exe ran OK
after choosing "Ignore" for each file. There was no problem in my testing
because I have those files.
Most of the "missing" files were temporary files (012345678.dbf, etc) but
some were dbf's on my system that he doesn't have or need.
From what I can tell, the error messages come up when DO FORM is
encountered and before any of my code in the form executes. The trace
shows that the program stops at DO FORM and before READ EVENTS.
I suspect the files may have been open when I created the exe and somehow,
VFP assumed they were needed. They are not needed and are not in the
project.
My exe uses only free tables and the default database (i.e. I never
specified a database).
I was able to fix this by deleting all the files that were being called. I
also made a slight change to the form so that it would get re-generated
when I re-built the exe.
But that's only a stop-gap solution since it seems it could happen every
time I build an exe and I have no way to know what files might be needed
until I distribute the exe and get feedback from others. That's not a good
thing.
I've only been using VFP8 for a short time but I don't think I've ever seen
this in VFP6.
What can I do to prevent this from happening in the future?
Thanks, Frank Tag: Count number of character Tag: 197759
Alternative to upsizing wizard
I have a VFP database that has some "unusual" features in indexes and views,
like some IIF's, PADR's, UPPER's, etc., that the upsizing wizard doesn't
know what to do with. Since I'm new to SQL Server, I don't know what to do
with them either.
Anyone have suggestions? Should I just simplify the VFP database? That would
require some modifications to the application.
--
Email to (remove spaces and make other obvious corrections):
p p m b 2 0 0 4 - 2 0 0 4
at
y a h 00 Tag: Count number of character Tag: 197756
Automatically E-mail Reports
I'm new to this group and need some help. I consider myself a novice
when it comes to VFP. I'm looking for an easy way to modify our
database to automatically E-mail packing lists to a static E-mail
address at one of our sister companies. I'm finding this a challenge
because there are no comments in the code and I was given no
programmers documentation.
I found a plugin called eReports that will do this, but I can't for
the life of me follow their examples. I'd like to convert the report
to .htm format then I'd like to send it out as an attachment without
the user noticing. Before everyone starts yelling "post on eReports
forum for help" I've already posted a message on their forum and
haven't received response yet.
I'm running Visual FoxPro 6.0 with Service Pack 3. Any help would be
appreciated.
***** Here is the eReports snippet for converting to htm format ******
LOCAL lnResult, oHTML
oHTML = NEWOBJECT("eReportsHTML", "eReports.dll", "eReports.dll")
oHTML.ReportFile = "myReport.frx"
lnResult = oHTML.ReportConvert()
RELEASE oHTML
***** Here is the eReports snippet for SMTP *****
LOCAL loSMTP, lcRecipient, lcName, lnResult
loSMTP = NEWOBJECT("eReportsSMTP","eReports.dll","eReports.dll")
loSMTP.Unlock("Organization - E8FTY 4JR8S 2JX4R 49FJR")
loSMTP.SMTPServer = "mail.johndoe.com"
*-While not required, some SMTP servers need this. If you get -505
*-error, this is the likely solution.
loSMTP.SMTPDomain = "johndoe.com"
*-Optional
loSMTP.SMTPLogFile = "c:\SMTPLog.txt"
loSMTP.FromAddress = "support@johndoe.com"
loSMTP.FromName = "Support"
loSMTP.Subject = "Test"
loSMTP.MessageBody = "This is a test"
*-Alternatively Insert a message file between the quotes below
*-The message file can be an exisiting boilerplate text/rtf file or an
*-html file generated by eReports.
*-If the message file is HTML, set the MessageFormat property to 1 or
2 (see help)
*loSMTP.MessageFormat = && valid parameters are 0,1,2,3 (see help)
*loSMTP.MessageFile = "" && "C:\eReports\Output\myreport.htm"
*-The first parameter is the friendly name like "John Doe" or "" for
empty
*-The second parameter must be a valid email address
*-The third parameter is the recipient type - 1=Normal, 2=CC, 3=BCC
lcRecipient = "jdoe@johndoe.com"
lcName = "John Doe"
loSMTP.AddRecipient(lcName,lcRecipient,1)
*-Include an optional attachment file by adding the file name between
the quotes
*-below or using a variable that points to an existing file.
lnResult = loSMTP.AddAttachment((lcPDFFile))
lnResult = loSMTP.SendMail()
IF lnResult = 0
MESSAGEBOX("Message Sent",0,"System Message")
ELSE
MESSAGEBOX("An Error occured:"+CHR(13)+loSMTP.ErrorLog,0,"System
Message")
ENDIF
RELEASE oSMTP
***** This is the Exit command button code where the packing lists are
printed in our database *****
if times=0
thisform.mybutton1.cmdnext.click
endif
private is_tally
is_tally=0
thisform.label1.visible=.t.
thisform.edton_hold.enabled=.f.
thisform.command1.enabled=.f.
thisform.refresh
select exe_packinglist_0
replace on_hold_a with thisformset.form3.edton_hold.value
if tableupdate(.t.)=.f.
messagebox("Error in saving exe_packinglist_0.",0+16,"Error")
tablerevert(.t.)
else
thisform.lockscreen=.t.
scan
thisformset.qtyorder_num=exe_packinglist_0.order_num_a
thisformset.qtyseq=exe_packinglist_0.packing_seq
=requery("exe_packinglist")
select exe_packinglist
replace on_hold with exe_packinglist_0.on_hold_a all
if tableupdate(.t.)=.f.
messagebox("Error saving exe_packinglist
"+alltrim(Exe_packinglist.model_a)+".",0+16,"Error")
tablerevert(.t.)
endif
select exe_packinglist_0
endscan
thisform.lockscreen=.f.
endif
thisform.label1.visible=.f.
thisform.edton_hold.enabled=.t.
thisform.command1.enabled=.t.
thisform.refresh
select approval_pl
scan
thisformset.qtyorder_num=approval_pl.order_num
thisformset.qtyseq=approval_pl.seq
=requery("doc_pl")
if _tally!=0
is_tally=1
report form doc_pl to printer noconsole
endif
endscan
if _tally<>0
thisformset.form4.visible=.t.
thisformset.form4.show
thisform.enabled=.f.
endif
****************************************
Again, if anyone can point me in the right direction (or at least help
me get started), I would appreciate it.
Best regards,
Tom Tag: Count number of character Tag: 197744
global datasession
It appears that even though Datasession 1 is called the "global data
session" it is not actually global because when you are in another
datasession you apparently can't access tables in datasession 1. Is
that correct?
Assuming it is correct, what would be the best way of having certain
tables that you want to make available to all the forms in an
application, even though these forms have private datasessions? The
application I have is a school application that needs read access to
student records from many different forms. I have standard procedures
that have been opening up the student data files and reading from them
when I need information, but the coverage profiler shows that this is
a real performance killer. It would be much faster to have the tables
open all the time for read access. I could simply open the tables
when I start each form that needs access, but having a global instance
of the tables would be quicker and more helpful.
Kevin Clark
Seton Home Study School Tag: Count number of character Tag: 197739
Grids on form with Private Datasession and 3 tier application
Please could someone give me a pointer in the right direction on this
please.
I am developing a small application but I would like to stick with the 3
tier architecture if possible.
My forms are modeless with private datasessions. The problem is, I would
like to display a recordset in a grid on my form. The grid control will only
allow a table/cursor as a record source so I need some way to get that
recordset through the tiers. I have tried creating a cursoradapter but the
cursor gets created in the default datasession instead of the private one. I
am on the verge of just coding the data access straight into my grid control
but that would break the 3 tier design.
Is my best option ADO or another idea? If I use ADO is there a grid that
will accept ADO as a recordset or do I have to convert it back to a cursor?
Your thoughts please.
--
Regards
Darren Woodford - MCP, MCSE
Woodford Computer Systems Ltd
http://www.woodfordcomputers.co.uk
http://www.pegasus-opera-ii.co.uk Tag: Count number of character Tag: 197737
Conditional Counter field ..
Want to add a Counter field to a Table which should be incremented only if
certain field in the table is NOT EMPTY() ?
How can I achieve this ?
Urgent Response is urged. TIA Tag: Count number of character Tag: 197734
VFP6 and Excel
Hi
I have a program in VFP6 that has OLE excel worksheet in a form I am able to print what I want by calling oXObj.PrintOut() but I can't get .PrintPreview to work. I would also like to be able to bring up the standard Print Dialog window can anyone help me with this.
Any help greatly appreciated.
Warren
warrenjw@austarnet.com.au Tag: Count number of character Tag: 197729
VFP6 & VFP8 on the same computer
Hi,
I have upgraded my computer from VFP6 to VFP8 for what i had to uninstall
VFP6, however I have a framework (Visual Promatrix 6.0) that is sending
error when I try to execute under VFP8....
is it possible to have both VFP versions installed concurrently on the same
computer? how?
thanks
Oscar Taboada Tag: Count number of character Tag: 197728
FPW2.6a changing browse title
In FPW2.6, can I change the title of a browse window without releasing /
redisplaying the browse?
* something like this, but working ;)
*****************************************
CREATE CURSOR test (test L)
m.ltitle="text1"
ON KEY LABEL f12 DO chgtitle
BROWSE TITLE m.ltitle
****************************
PROCEDURE chgtitle
****************************
PRIVATE m.loldtitle
m.loldtitle=m.ltitle
m.ltitle="text2"
SHOW WINDOW (m.loldtitle) REFRESH
* also tried MODIFY WINDOW (m.loldtitle) TITLE (m.ltitle)
*eof
At the moment I'm doing this:
*************************************
CREATE CURSOR test (test L)
m.test="text1"
m.looping=.T.
ON KEY LABEL f12 DO chgtitle
ON KEY LABEL esc DO killit
DO WHILE m.looping
BROWSE ;
TITLE m.test
ENDDO
ON KEY LABEL esc
ON KEY LABEL f12
*******************
PROCEDURE chgtitle
*******************
PUSH KEY CLEAR
RELEASE WINDOW (m.test)
m.test=IIF(m.test="text1","text2","text1")
POP KEY
*******************
PROCEDURE killit
*******************
PUSH KEY CLEAR
m.looping=.F.
RELEASE WINDOW (m.test)
POP KEY
*eof
--
TIA
Andrew Howell Tag: Count number of character Tag: 197721
Create Label generates C0000005 error
I have a VFP8 SP1 application (compiled EXE) that generates a C00000005
error whenever I run "MODIFY LABEL XXX" or "CREATE LABEL XXX" (xxx does or
does not exist - makes no difference).
I have another VFP8 SP1 application in the same directory (Command prompt
emulator) that does not give C00000005 error.
In both cases, no tables are open so it has nothing to do with data file
corruption, indexes or a corrupt label file.
Any ideas?
Cheers
David Younger Tag: Count number of character Tag: 197719
Any real speed advantage with dual Xeon processors?
Hi,
I'm looking for the fastest performance I can get on a networked VFP app.
The server which holds the data is currently dual Xeon, lots of RAM, Win
2003 Server, 15K SCSI drives, 10/100BaseTX LAN. My current idea is to
upgrade the server to 1000BaseTX, and buy a dual Xeon workstation, plenty of
RAM, 1000BaseTX, 15K SCSI drives and XP Pro. The app only needs to work on
the one workstation, and the server is simultaneously handling data for 50+
other workstations with lower performance requirements. The data is all free
table - I can't use DBCs/stored procedures because of FPD apps sharing the
data. Do the dual processors make a difference to workstation speed with
VFP? Does anyone have any better ideas? VFP7, but going VFP9 as soon as it's
available.
Regards,
Neil Tag: Count number of character Tag: 197713
Dear All,
Would anyone to tell me how to count how many character in a string.
"Ah Wa" <cpcpwy@ahwa.net> wrote in message
news:%238dYTJffEHA.3016@tk2msftngp13.phx.gbl...
> Dear All,
>
> Would anyone to tell me how to count how many character in a string.
>
> Thank you very much for any reply.
>
> Ah Wa
>
>
The others have told you how to get the total length of the string, but if
you need to know how many of a specific character or substring, you can use
OCCURS():
nAB = OCCURS("ab","abacab") && 2 occurences of "ab"
Fred
Microsoft Visual FoxPro MVP
"Ah Wa" <cpcpwy@ahwa.net> wrote in message
news:%238dYTJffEHA.3016@tk2msftngp13.phx.gbl...
> Dear All,
>
> Would anyone to tell me how to count how many character in a string.
>
> Thank you very much for any reply.
>
> Ah Wa
>
>
Also, be careful when applying this to a field. If you have a field Myfield,
char, 30, with value "abcde".
? LEN(Myfield) will always return 30.
? LEN(ALLTRIM(Myfield)) will return 5.
"Ah Wa" <cpcpwy@ahwa.net> wrote in message
news:%238dYTJffEHA.3016@tk2msftngp13.phx.gbl...
> Dear All,
>
> Would anyone to tell me how to count how many character in a string.
>
> Thank you very much for any reply.
>
> Ah Wa
>
>