VFP7 weird problem with buffered added records
This is the most bizarre behaviour I've seen yet in VFP7.
I have a form that allows add/edit of 2 related files, a
header with detail records. When I click the Add button,
it adds a record to the header( recno -1) and the detail
(recno -1) automatically. If I click revert, I issue
TABLEREVERT on both tables and everything is fine.
When I click Add again, it again adds a record to the
header( recno -1) and the detail but this time recno is -2
even though there is no recno -1 on the file (I checked
this at the command box with GO -1).
This I don't understand but what's more, if during this
add I go off to a totally unrelated form and do and Add on
it and then Save which does a TABLEUPDATE on a completely
different table, when I hit the END TRANSACTION of this
table's Save code, the record number on the totally
unrelated file changes from -2 to -1, so my code that
tries to position on the correct record number on the
details file when returning to the screen crashes with EOF
encountered.
Help!!! I can't see any way of fixing this behaviour.
Bernie Tag: VFP on Linux? Tag: 181030
primary and candidate index
Primary and candidate index best to avoid double data,
but unfortunately in share environment We ecounter problem.
Because we cannot pack the deleted record, meanwhile index
ignore the state of delete so it still exists in index.
When we add a record with key that has been deleted but
not packed yet, it will violate the unique.
Is there any way to solve this ?
Thanks in advance Tag: VFP on Linux? Tag: 181025
sending email via lotus notes more than one recipient
Why Lotus Notes does not sending email if the recipient
more than one. It does save to sent folder but it does not
automaticlly send. If the recipient only one it work
perfeclly.
I have other code too from friends here, using
cusNotesAutomation class, but it work like my code below,
does not automaticlly send if more than one recipient.
Can someone help ?
Sen
Here are the code:
SES = CREATEOBJECT("Notes.NotesSession")
m.MailFile = ses.GetEnvironmentString("MailFile", .t.)
m.MailServer = ses.GetEnvironmentString("MailServer", .t.)
DB = SES.GetDatabase(M.MAILSERVER,M.MAILFILE)
DOC = DB.CreateDocument()
RTITEM = DOC.CreateRichTextItem("FileToAppend")
DOC.form = "Memo"
DOC.subject = "pls iqnore this"
DOC.body = ""
DOC.SaveMessageOnSend=.t.
lcsendto="aaa@aaa.com,bbb@aaa.com"
DOC.sendto=lcsendto
lcret=doc.send(.t.,lcsendto) Tag: VFP on Linux? Tag: 181024
Capture en print signature
Hi,
I had a question from a client that wants to capture a
signature from their clients in real time, and print it on
a confirmation report. I thought of putting a MS Paint
object in a form and letting the client sign via a graphic
tablet. Also I saw an article in Foxpro Advisor about
tablet PC's, where you can use a pen to draw on the
screen. However, I don't want to use a Tablet PC, but the
idea of a pen seems intresting for this project. Does
anybody have experience with this kind application, or can
you advice me on what best to use ?
thanks in advance
Xavier Tag: VFP on Linux? Tag: 181019
Label Design
Hi,
Is there a way to design Label files (Label Definition Files)
programmatically?
I would like to create labels on the fly through a program (define margins,
no of columns etc)?
Demetrios, Greece Tag: VFP on Linux? Tag: 181015
Display Problem, Probably OS-Related
This question is about using VFP 8.0 in the development environment under
Windows/2000.
When I bring up certain OS dialogs that permit the user to select a file or
subdirectory, the files are not in alphabetical order.
For example, if you issue the command "CREATE CLASS" and click on the "Store
In" button, you get the "Save As" dialog which permits you to select a file
or a subdirectory.
Another example: issue the command "CREATE CLASS" and click on the "Based
On" command button. You get the same dialog but it is labeled "Open".
On my last development machine, which ran Win/NT 4.0, the files and
subdirectories were displayed in this dialog in alphabetical order. On the
Win/2000 machine, they are not in alphabetical order. It's not clear what
order they are in, maybe most recently accessed.
Is there some way to get them to be displayed in alphabetical order?
Thanks, Chaim Tag: VFP on Linux? Tag: 181012
need to access VFP8 tables from VC++ ?
I need to access VFP8 tables from VC++; I can see that
there is a Visual Fox Pro ODBC Driver for Database and
Tables that comes with Microsoft Data Access Components
2.8 but when I try to use the driver through Microsoft
Access (link the tables) I get the following error
Could not execute query;could not find linked table.
[Microsoft][ODBC Visual FoxPro Driver]Not a table (#123).
Is the driver that comes with MDAC 2.8 reliable or should
I use something else (any other commercial or shareware
product)?
THANKS! Tag: VFP on Linux? Tag: 181011
What is the purpose of the ` key in VFP?
This is character below the ~. It seems like this key
does something, but I can't find anything that says
what. I am curios because I hit it accidently once in a
while, and the next character displayed is unprintable -
just a box. Is it the first key in the god-mode
sequence?! :) Thanks for the info.
Ben Tag: VFP on Linux? Tag: 181005
MSComm and Windows XP
Has anyone had success running the MSComm32 ActiveX control with VFP on
Windows XP? I have an app which runs fine with Windows 2000, but gives no
serial input with XP Pro. Same application, same computer, both running in a
development environment with VFP7 SP1, and the MSComm32 OCX definitely
installed and registered.
I can get serial input no problem with HyperTerminal on XP, and the MSComm
CommEvent property seems to be stuck on 3 - not sure what that means. Sorry
I can't give more information, but I had to roll it back to Windows 2000
quickly because of time constraints. Any pointers for the future would be
appreciated.
Regards,
Neil
---
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003 Tag: VFP on Linux? Tag: 181002
Strange Behavoir in Grid in VFP8
I have a form that contains a page frame consisting of 5 pages. On page 1 I
have a grid that is linked to the child data.
On page 2 I have a command button that calls a form method that positions
the cursor back to the first text box on page 1. When page 1 gets the
focus, the grid still shows the child data, however, the scroll bar is
disabled and the row highlight bar will not move. When I click on different
cells in the grid, they will change to another color. It is like the record
pointer is not being moved or the relationship in the grid is lost.
The code in the command button is:
SELECT posinvoice
thisform.pfPOS.pgItems.setfocus()
thisform.pfPOS.pgItems.cntItem.getsku.setfocus()
There is no code in the setfocus methods of each control.
Has anyone experienced this or do you know what may be happening.
Thanks in advance.
John. Tag: VFP on Linux? Tag: 180991
Word Automation Problem
Hello - my application uses ole Automation to integrate the Word spell check
with certain things in my program. I have some users who say it gives errors
and Word does not start. I do not understand why. One user said that it
worked on all their workstations except one. All of the configurations were
the same. I had them try to uninstall and reinstall Word as well as my
application and it still did not work. As an experiment I had them try and
downgrade their Word 2000 to Word 97 and it worked on that one workstation that
was causing the problem. What would cause this? Why does it work fine on all
the other workstations with Word 2000 but not that one? I have another client
who has the same problem - it's working on all their workstations except one
and they too have Word 2000. I have this feeling that it is some registry
problem but if so how would they go about fixing it?
Thanks for any help,
Mike Tag: VFP on Linux? Tag: 180990
decompiler
I am a foxpro 2.6 developer and have an application, which has a
version that my predicessor lost the source code. Beings that I have
the .app file, is there a decompiler out there, that could be used to
get the source code back. Any help would be appriciated. Tag: VFP on Linux? Tag: 180988
Grid order by
I have a grid that shows data from a table and I have in the data
environment to have the table that is uses to be ordered by a certain field.
When it shows up in the grid it is not ordered by this field though. Is
there a way to get this to be ordered??? What am I doing wrong?
--
Altman
VFP7 SP1
"No matter how foolproof you make a system, 'fools' can be remarkably
ingenious." Tag: VFP on Linux? Tag: 180980
How to get rid of lastkey() value
We have some old code in our system that checks whether
lastkey()=27 before exiting screens etc. It appears that
whenever a Cancel button (terminateread=.T., cancel=.T.)
is pressed, lastkey() equates to 27 even though the user
hasn't pressed the Escape key. I am trying to clear
lastkey to minimise the code needing changed, but I can't
get it to work. Here's what I've tried -
KEYBOARD "{Enter}" CLEAR && to stop lastkey() being equal
to 27!
CLEAR TYPEAHEAD
This seems only to work every second time for some
reason???
Any ideas?
Bernie Tag: VFP on Linux? Tag: 180967
Filer.dll question
This is a multi-part message in MIME format.
------=_NextPart_000_0010_01C377B5.9255FA80
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
In the following code sample, I could not get the file collection =
(Directory and subdirectory names in this case) sorted properly:
************************************************
close all
clear all
clear
set talk off
oMyFiler =3D createobject('Filer.FileUtil')
oMyFiler.SearchPath =3D getdir()
oMyFiler.Subfolder=3D1
oMyFiler.FileExpression =3D '*.'
oMyFiler.Find(0)
oMyFiler.Sortby=3D1 && Path and file name
for nFileCount =3D 1 to oMyFiler.Files.Count
if left(oMyFiler.Files.Item(nFileCount).name,1)=3D'.' or =
oMyFiler.Files.Item(nFileCount).attr#2064
loop
else
=
?oMyFiler.Files.Item(nFileCount).path+oMyFiler.Files.Item(nFileCount).nam=
e
endi
endfor
close all
clear all
set talk on
************************************************
Any suggestions?
sp
------=_NextPart_000_0010_01C377B5.9255FA80
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>In the following code sample, I could =
not get the=20
file collection (Directory and subdirectory names in this case) sorted=20
properly:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>************************************************</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>close all</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>clear all</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>clear</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>set talk off</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </DIV></FONT><FONT face=3DArial =
size=3D2></FONT>
<DIV><FONT face=3DArial size=3D2>oMyFiler =3D=20
createobject('Filer.FileUtil')<BR>oMyFiler.SearchPath =3D=20
getdir()<BR>oMyFiler.Subfolder=3D1<BR>oMyFiler.FileExpression =3D=20
'*.'<BR>oMyFiler.Find(0)<BR>oMyFiler.Sortby=3D1 && Path and file =
name</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>for nFileCount =3D 1 to=20
oMyFiler.Files.Count<BR> if=20
left(oMyFiler.Files.Item(nFileCount).name,1)=3D'.' or=20
oMyFiler.Files.Item(nFileCount).attr#2064<BR> loop<BR> el=
se<BR> ?oMyFiler.Files.Item(nFileCount).path+oMyFiler.Files.It=
em(nFileCount).name<BR> endi<BR>endfor</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>close all</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>clear all</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>set talk on</FONT></DIV><FONT =
face=3DArial size=3D2>
<DIV><BR>************************************************</DIV>
<DIV> </DIV>
<DIV>Any suggestions?</DIV>
<DIV> </DIV>
<DIV>sp</FONT></DIV></BODY></HTML>
------=_NextPart_000_0010_01C377B5.9255FA80-- Tag: VFP on Linux? Tag: 180951
Visual FoxPro News for September
Hello, All!
I didn't see an announcement in the group so here goes.
KL's latest letter in which he talks about VFP8 SP1
http://msdn.microsoft.com/vfoxpro/letters/
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8 Tag: VFP on Linux? Tag: 180939
Keep focus on same control
Hi all, I'm having a tetbox on my form I want the users should type (or scan
from barcode) a value then in VALID event process some code then clear the
value and keep focus on same textbox to type in new values but I can't call
Setfocus event from Valid or LostFocus events.
Any help will be greatly appriciated.
Thanks
Simon Tag: VFP on Linux? Tag: 180929
foxpro tables on PocketPc
Dono anymore who was looking for something similar
(it was more appdev) but this can be a start
Foxpro with index compatible
tables on a pocketPc !
I didn't try it (later maybe)
but maybe others now something more about it
http://www.pylin.com/docs/doc_xbase.asp
christophe
belgium Tag: VFP on Linux? Tag: 180924
New MSGraph
FoxPro user group,
Can we -fox developers- reditribute the new version of
MSGraph?
Thanks in advance...
Bastian V. Tag: VFP on Linux? Tag: 180910
Divid by Zero Error
hi;
I'm working in foxpro. Program, but whenever i tried to
print it gives me zero error.
so i will be grateful, by find a solution for this errore
from from any one. Tag: VFP on Linux? Tag: 180904
Is Nothing $ Nothing?
Check the following:
STORE "" TO nada
STORE "" TO zilch
? nada $ zilch && Returns .F.
STORE SPACE(10) TO nada
STORE "" TO zilch
? LEN(nada) && Returns 10
? zilch $ nada && Returns .F.
Is this appropriate behavior?
Okay, so it sort of makes sense that if something doesn't contain
anything, then it can't even contain nothing.
But it sure kabolixes things up when you want to do a "contains"
comparision where an empty string or an empty character field are just
as valid values for comparison as any other.
My particular case is a system where "jobs" are set up by one
department and "invoices" are assembled from those jobs by another
department. An invoice can contain many jobs, done over a period of
time. The idea is to automatically pull all jobs being billed to the
same organization into one invoice. Since the same organization can be
represented by different strings (ie., "Lourdes Hospital", "Our Lady
of Lourdes Hospital", "Our Lady of Lourdes", or just "Lourdes"), I
need to start with some job (preferably the shortest name), and look
for all other jobs that contain the organization name from the current
job. IE,
temporgan = "Lourdes"
SELECT..... ;
WHERE UPPER(ALLTRIM(temporgan)) $ UPPER(ALLTRIM(organ))...
My workaround is to create two separate WHERE clauses--one to use if
"temporgan" turns up empty and one if it doesn't.
Not difficult, but this did bite me when, after the system had been in
use for several months, it finally stumbled on a billing contact with
no organization name.
It seems to me that $ would be even more useful if it would return .T.
when it compares two variables that, in the end, both evaluate to
EMPTY().
Thanks for your thoughts.
Ken Dibble
Southern Tier Independence Center, Inc. Tag: VFP on Linux? Tag: 180892
Using a Dll With an Event in a VFP Form.
I have a client that is adding a barcode card reader to a turn style access
gate. The reader vendor provided a dll with examples for VB. I have used
3rd party dll's before but never to respond to an event initiated by the
dll.
I can connect to the reader and send data.
When I use there connection string I connect and can send data but return
.Null. as the return value instead of the 0 or 1
nRetval = 0
nGateNumber = 1
nIp = 10.10.1.2
nMyRetval = oreader.SendConnection(nGateNumber, nIp, nRetVal)
It requires the 3rd parameter but always returns .Null. (I have played with
various values of nRetVal although this is actually the retval. and the
value of nRetVal is always the value that I set it to after I call the
method.)
My other issue is I am not sure how to respond to the DataFromGate event
generated when a user scans there card.
I need to take the card number and look it up to see if they are paid up and
open or close the gate.
This will be called from form open on the front desk used to see details if
the account is past due or to manually open the gate. But for 98% of the
people the form will function without any user input other than the scan of
the card triggering the DataFromGate Event which sends the form the card
number.
I believe i need to create a wrapper for the DataFromGate method but and not
sure how to do that or add it to my existing form.
Thanks for your help.
Larry Oliver
All the documentation I have is included below.
dll Reference
Methods
CloseConnection ()
Description:
Closes the connection with the card reader or IPC.
SendData (short validEntry, short sound, short light, variant
textLine1,variant textLine2, variant textLine3, short time)
Description: Controls the connected gate. Can be used to open the gate, keep
it closed and display messages.
Parameters:
validEntry - The action to be taken by the gate. 0 Keep the gate closed, 1
open the gate.
sound - The type of sound to be made by the gate. 0 sound off, 1 valid, 2
not valid, 3 error
light - type of flashing for the light. 0 light off, 1 solid on, 2-13
various flashing speeds.
textLine1 - First line of text to be displayed on card reader.
textLine2 - Second line of text to be displayed on card reader.
textLine3 - Third line of text to be displayed on card reader if available.
time - Length of time in seconds for the gate to flash or display a message
before being reset.
SetConnection (long gateNumber, variant IPAddress, long returnValue)
Description: Connects to an IPC or individual card reader. Must be called
first in order to receive gate events and send data.
Parameters:
gateNumber - The number of the card reader, either 1 or 2, used for
compatibility with systems using an IPC.
IPAddress - A string containing the IP address of the individual card reader
or IPC.
returnValue - The result of the connection attempt. 1 successful, 0 failed.
Events
DataFromGate (String cardNumber)
Description: Called when the gate has received a card number scanned by a
member.
Parameters:
cardNumber - The number on the card scanned by the card reader. Tag: VFP on Linux? Tag: 180885
Dragging classes on to form...
There is probably a very simple answer, but how do I drag an object in the
class browser onto a form? Or how do I place the object such as a command
button onto a form? Tag: VFP on Linux? Tag: 180881
Communications
Hello all,
The application I am working in copies files into a PC from a remote
server via pcAnywhere. The problem I have is that a dialog asking the user
for permission is presented. The dialog refers to the pcAnywhere's .CHF file
that the app uses to establish the connection. This occurs in Windows XP
boxes.
I noted that if the Software Restriction Directives branch of the
machine's Local Security is empty the dialog is not launched. How can I
Eliminate the contents of this branch (I mean all the content)?
Any help is a great help.
TIA
Carlos Jones Tag: VFP on Linux? Tag: 180873
Subclassing Foxpro Class Libraries
Hi everybody,
I am looking for Tool (PRG, APP, EXE) which enables me to subclass a Class
Library such that it retains all the Properties and Class hierarchy of the
Parent Class.
I will be very thankfull to anybody who could help me find such tool.
--
Tanveer H. Malik
LAHORE. (Pakistan)
Cell: +92 333 4227099 Tag: VFP on Linux? Tag: 180841
font changed
How can I fix the font of the VFP compiled exe file ? It is because the
font changes according to the system font of the OS that the exe file runs,
the labels become mess up.
Matthew Tag: VFP on Linux? Tag: 180837
How to find out how many instances running.
Hi all
I use an addon for Outlook that is creating multiple instances of Outlook to
run invisibly. I can see them all using Task Manager.
Is there a way in FoxPro or API to count how many instances of any
application are active? This might be useful in other circumstances where a
bug in my automation code leaves multiple copies of Word running.
Malcolm Tag: VFP on Linux? Tag: 180834
how to link with COM port
hello, i would like to know the coding to link the
program with COM port.. i'll will appreciate it.. Tag: VFP on Linux? Tag: 180828
VFP Remote Access Issues
Hello - I have a few questions about remote access with VFP.
First - does anyone have any idea as to the future speeds of the internet? We
have of course basic dial up, DSL, T1, etc. In general most have either dial
up or DSL or cable with top speeds of 500kbs or so. This is too slow if one
wants to map a drive through the intenet.
What is wrong with VFP? What in the world is it sending to the workstations on
a LAN? Seems like a lot of junk data or something. Certainly a lot more than
raw data is being passed.
I'm wondering if instead of a file server application I wrote a front end/back
end application using VFP as both the front end and back end and using a socket
control with TCP/IP if it would be a lot faster over a dial up. Or, if that
even makes any sense given that some of the hotels already have a high speed
connection. Or perhaps another soluition such as VFP on the web? I'm not sure
but does anyone have ideas for remote access improvements with VFP? Or will
technology bail us out with faster connections? If so - how long before we see
some real speed improvements at a reasonable cost? My understanding is right
now they are just way too expensive. Seems like even a T1 is not fast enough
when mapping a drive using VFP and with a lot of users something like Terminal
or Citrix server (which only does screen transfers) is too expensive.
Just exploring ideas,
Thanks.
Mike Tag: VFP on Linux? Tag: 180819
CURSORGETPROP / tablerevert
Hello, Im attaching a part of my code that seems to function
abnormally. I initiated cursorsetprop on my POSDetail table
(optimistic table buffering). I have to add the first record BUT
before i issue a TABLEREVERT or TABLEUPDATE, I have get some records
from another table. Those records need to get checked if there's an
actual onstock. If one of those records did not have enough stock, it
will actually TABLEREVERT all the records added, so it will return to
original form as if nothing was added. For some reason, it didnt
wanna revert all the records. Records that were already added stayed
in the table as if i had initiated a tableupdate which i did not.
If i issue a CURSORGETPROP(), will that function hold true for as long
as i didnt issue a tablerevert or tableupdate? or if i move from one
table to another and do some select statements in between the
CURSORGETPROP and TABLEUPDATE/TABLEREVERT, will it lose its state?
please help me out.
thanks.
select posdetail
=CURSORSETPROP("Buffering",5,"posdetail")
APPEND BLANK
replace detailno with lnNewId
replace transactno with lcTransactno
replace productid with lcProductID
replace quantity with thisform.txtqty.value
replace discount WITH thisform.txtdiscount.value
replace itemsales with thisform.txtsales.value
REPLACE itemcost WITH lcCost
replace nettotal with lcNetCost
replace grosstotal with lcGrossCost
bChkStock = .T.
IF thisform.bokits.Value THEN
SELECT bo_kitsku,bo_sku,bo_qty,bo_display FROM bokits ;
WHERE bo_kitsku = thisform.txtskucode.Value ;
INTO CURSOR botemp
SELECT botemp
GO TOP
nId = lnNewid
SCAN WHILE NOT EOF()
IF SEEK(botemp.bo_sku,"product","skucode")
IF product.onstock < 1 or THEN
=MESSAGEBOX(ALLTRIM(product.productname)+" does not have enough
stock!",0+16)
lbChkstock = .F.
EXIT
ELSE
lcProductid = product.productid
nId = nId + 1
INSERT INTO posdetail(detailno,transactno, productid, quantity,;
mod_user,mod_date,locationid) ;
VALUES (nId,lcTransactno, lcProductID,
botemp.bo_qty*thisform.txtqty.value, ;
goprogram.cusername, DATE(), VAL(goprogram.cregion_code))
ENDIF
ENDIF
SELECT botemp
ENDSCAN
USE IN botemp
ENDIF
SELECT posdetail
IF bChkStock THEN
=TABLEUPDATE(.T.,.T.)
ELSE
=TABLEREVERT(.T.,"posdetail")
ENDIF Tag: VFP on Linux? Tag: 180812
define popup
I am trying to get a popup to show up under a command button when it is
clicked but I am having problems on getting it located without trial and
error and a static number. Any suggestions?????
--
Altman
VFP7 SP1
"No matter how foolproof you make a system, 'fools' can be remarkably
ingenious." Tag: VFP on Linux? Tag: 180807
Copying Files
Hi Everyone!
I am trying to copy a shortcut file from a directory on
my network to the desktop of a users computer. The problem
I am having is that under Windows 2000 a users desktop
directory is under the directory Documents and Settings.
When I try to get FoxPro to copy to c:\documents and
settings\kevin\desktop\ I keep getting invalid directory
or path errors. Anyone have any ideas on how to copy to
this directory? Also I can't string a path name together.
Example :
k = kevin
path = 'c:\documents and settings\'+'k'+'\desktop\
copy file k:\test\sbtest.lnk to path - This will not work
eithier
Thanks Tag: VFP on Linux? Tag: 180787
macro substitution
I have the followig code in a routine, which i neeed it to
refresh data in different forms, having objFormName= to
the form name.
&objFormName..GridSignOff.RecordSource='rv_view_singOffList
VirtualSql'
&objFormName..GridSignOff.Refresh()
Everithing works well, but when I compile the application,
I get a message stating the the form name contained in the
variable objFormName is not an object.
What i am doing wrong here?
Can anybody help before i perform a "MACRO SUBSTITUTION"
to my monitor?! Tag: VFP on Linux? Tag: 180780
UNC problem
I have an application that is located on a server LIVE in a directory MYAPP.
All of the users will login and map the S: drive to \\LIVE\MYAPP. All of
the application files and subdirectories are under this main directory. The
application DOES NOT use any UNC paths to find files. The application will
always look under the S: drive for files and directories.
I wanted to create a test login for this application. I copied the entire
application along with the data files to another share (TESTAPP) on the LIVE
server. The test login will map the S: drive to \\LIVE\TESTAPP.
When the test login is initializing variables, it looks for a "Variable
save" (.mem) file to load the variables and values. This .mem file DOES not
exist on the test environment, but does exists on the live application. So
stepping through the application on the test login, the application set a
variable equal to the mem file name. gf_memfile =
"S:\MEMFILE\AMEMFILE.MEM". The application then tries to verify the file
exists with the FILE() command. It returns .t. even though the file does
not exist! The value of gf_memfile remains equal to
"S:\MEMFILE\AMEMFILE.MEM". The next statement is a RESTORE FROM command
that executes without an error. The gf_memfile variable gets changed to
\\LIVE\MYAPP\MEMFILE\AMEMFILE.MEM!!!! Why is that? Where does it get the
UNC from?
I don't believe this is a Foxpro problem, but rather an OS problem, but I
can't be sure. Any ideas?
<snip>
.....
gf_adrive = 'S:\'
gf_memfile = gf_adrive+ "MEMFILE\AMEMFILE.MEM"
IF FILE(gf_memfile) && does not exist, but this returns true
RESTORE FROM (gf_memfile) && this statement changes the gf_memfile
&& to a UNC pointing to the live application!
ENDIF
.....
</snip>
HELP!!! Tag: VFP on Linux? Tag: 180776
VFP to VB6
Hi
I'd a software written in Visual Foxpro 6 and now in the process of
converting the source codes into VB 6. I made use of lots of subclassed
controls in my software, like embedding a Checkbox, Command Button, Image or
Combo Box into some columns of a Data Grid. Is there a way to realize these
functions in VB 6 without buying other 3rd-party OCX controls ? Thanks a lot
in advance. Tag: VFP on Linux? Tag: 180771
Data Navigation
Hi
I have been a Visual Foxpro programmer for a few years and now looking
for a way to convert those VFP written system into VB6. I have some degree
of knowledge in ADO as I did write some Web-based database applications in
ASP using ADO as a data access interface. I faced some difficulties in
designing a Data Navigation Interface in VB6 coz I can't directly retrieve
and bind a million of records into data-bound controls. In VFP 6, I simply
used the following syntax to open a table and then directly set the
RECORDSOURCE of control to the STUDENT will do, need not bother too much
about the criteria in the retrieval of records. A simple Data Navigation
Interface with searching features is then easily created in VFP.
USE STUDENT IN 0 INDEX STUDENT SHARED
In VB6, I need to think of lots of data retrieval criteria. If I used the
following ADO syntax to retrieve the STUDENT
data will take me 10 minutes for the whole process and might cause system
hanging as well.
SET rsA = cnA.Execute "SELECT * FROM STUDENT"
In such scenario, the data is then broken down into smaller parts by putting
a WHERE clause as below.
SET rsA = cnA.Execute "SELECT * FROM STUDENT WHERE YEAR_ENROL = 2000"
The Data Navigation Interface will only have the recordset of those students
enrolled in the year of 2000. What if I want to search for a student by name
"LESLIE WILSON" who actually enrolled in 2001? Of course, the rsA.Find
syntax is not applicable in locating this student. In this case, I shall use
rsA.open "SELECT * FROM PATIENT WHERE NAME = 'LESLIE WILSON'"
However, by using this syntax, the Data Navigation Interface will then only
have this student record. I found this is not a nice method. In VFP 6, I
don't need to bother so much by using SEEK. What's the proper way of
handling this issue in VB using ADO ?
Thanks a lot. Tag: VFP on Linux? Tag: 180770
cursor shape in vfp6
Hi! I am using vfp6.0 in windows 2000 os. Whenever I
starts vfp6.0, I finds my cursor shape to be vertically
thin. Sometimes, I even can't identify its position on
screen. I want to change cursor shape. i.e. It should be
solid shaped, and in different color like red,green
etc.Would you like to give any help regarding the above
problem. Thanks
Pushpak.
. Tag: VFP on Linux? Tag: 180753
Error 1104 on zipfile, pls kindly help
Hi,
My application just only unzip some file and post them to my database file.
However, it might after a day, will give error of 1104, Error reading file
when
going to unzip the zip file.
Normally, before unzipping the file, I will tried to test whether the zip
file is
still posting half way by my client by fopen it to ensure that is is okay to
open it exclusive first. After that, I use Dynazip to test it integrity
before
unzipping the file, but error 1104 still happen to my application.
I am using VPF5a with Dynazip v4 running on Win98/95 with my zip file on
my NT server share folder.
Any possible cause of why this problem is happening ? I am at a loss. Tag: VFP on Linux? Tag: 180750
Reports produce different results every time
I have a client with a very large database. Some of the tables has about
half a million or more records in them. When I run a report using any of
tables, I get different results on every workstation. It is also different
on the same workstation if I run it multiple times. If I run it on the
server, it is fine. Write caching has been turned off on all workstations.
The server runs Windows NT 2000 and all the workstations have different
versions of windows on them. Is there any other type of caching that needs
to be turned off or has anyone else experienced this problem ?
TIA
Sujata Tag: VFP on Linux? Tag: 180747
XML to single or multiple cursor(s)
I have a project where I have to link our application to QuickBooks for
updating records in either application or inserting transactions in to QB.
US version of QB SDK had a foundation class and XML options and I used FC,
which had simplified my task but Australian version only supports XML.
I need to be able to create single and/or multiple cursors depending on the
XML dataset so that I can manipulate data easily in my application.
I experimented with the response xml file and find out if I only have 1
level of tags XMLTOCURSOR nicely creates a cursor that corresponds to the
xml structure except the variable types (eg. a datetime field was created as
a character field).
Eg. A response xml file from QB
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<TaxCodeQueryRs requestID="1" statusCode="0" statusSeverity="Info"
statusMessage="Status OK">
<TaxCodeRet>
<ListID>20000-1046324474</ListID>
<TimeCreated>2003-02-27T16:41:14+10:00</TimeCreated>
<TimeModified>2003-02-27T16:44:08+10:00</TimeModified>
<EditSequence>1046324648</EditSequence>
<Name>CAF</Name>
<IsActive>true</IsActive>
<Desc>Cap. Acq. - GST Free</Desc>
<Tax1Rate>0.00000</Tax1Rate>
<Tax2Rate>0.00000</Tax2Rate>
<IsTax1Exempt>false</IsTax1Exempt>
<IsTax2Exempt>false</IsTax2Exempt>
<IsPiggybackRate>false</IsPiggybackRate>
<IsECVatCode>false</IsECVatCode>
<TaxType>5</TaxType>
</TaxCodeRet>
<TaxCodeRet>
<ListID>D0000-1046324474</ListID>
<TimeCreated>2003-02-27T16:41:14+10:00</TimeCreated>
<TimeModified>2003-02-27T16:44:08+10:00</TimeModified>
<EditSequence>1046324648</EditSequence>
<Name>NCI</Name>
<IsActive>true</IsActive>
<Desc>Non-Cap. Acq. - for making Input Taxed Supplies</Desc>
<Tax1Rate>0.00000</Tax1Rate>
<Tax2Rate>0.00000</Tax2Rate>
<IsTax1Exempt>false</IsTax1Exempt>
<IsTax2Exempt>false</IsTax2Exempt>
<IsPiggybackRate>false</IsPiggybackRate>
<IsECVatCode>false</IsECVatCode>
<TaxType>3</TaxType>
</TaxCodeRet>
</TaxCodeQueryRs>
</QBXMLMsgsRs>
</QBXML
If I use XMLTOCURSOR function without any modification I will get either one
field or as many as the number of requests in the returned XML file (I can
send multiple queries to QB in one XML message and therefore get a multiple
response in one XML returned message) with
everything squashed in with out their tags.
Now if I remove <QBXMLMsgsRs> and <TaxCodeQueryRs .....> lines and also
corresponding end tag lines then use XMLTOCURSOR function it will give me a
cursor with field names and properties as
ListID (char 16),
TimeCreated (char 25), }these two is datetime field in the original
XML response file
TimeModified (char 25), }
EditSequence (num 10),
Name (char 3),
IsActive (logical),
Desc (char 47),
Tax1Rate (num 8),
Tax2Rate (num 7),
IsTax1Exempt (logical),
IsTax2Exempt (logical),
IsPiggybackRate (logical),
IsECVatCode (logical),
TaxType (num 1)
I can then work with this table to get what I want.
This is fine if I only deal with one request/response, but majority of
response(s) have more complex structure.
Is there a better way to deal with response XML files?
I saw in VFP8 new features that there is XMLAdaptor class that can accept
internal or external schemas and create single or multiple cursors but we
have some stability issues running our application in VFP 8 and therefore
not ready yet to go up to VFP8. I need to find a solution within VFP7
capabilities.
Cheers
Mehmet Tag: VFP on Linux? Tag: 180736
VFP 7 How to change command button text color
How do you change the text color of a command button
programatically? I've tried to change the forecolor
property, but that doesn't work.
Thanks,
Cliff Tag: VFP on Linux? Tag: 180733
_screen function
Hi guys,
I have create an object to display it as my background
using the _screen.createobject command line.
I had went through the help file but nothing in there
tell me how to create the screen such that it will
maximise to fill up all the white space.
I can drag the size to fill the screen size but my
concern is that if this were to implment to many
customer, this might not look good since chances are they
does have the same screen setting as mine.
Mine is 1024 X 768 pixel
Thanks a lot
Best Regards
Edwin Chua Tag: VFP on Linux? Tag: 180729
resizable frames within a form
Hi,
I need to create 3 or 4 frames(windows/sections/divisions) within a form
that the user can adjust in an easy way. think about the 2 or three frames
we usually have in Outlook or Outlook Express... the user just drag the
frame borders with the mouse and the other frames ar also automatically
adjusted
right now the only way I have found to solve this is using one Formset with
several forms and puting some code in the resize event of the forms to
adjust the others, however there is a problem:
the only visual container of the forms is _screen, it seems there is no
way to put the forms inside a single form object that contains them so I can
instantiate the same form with it´s internal adjustable frames and allow
the user to look at them as many software allows: Mosaic or Cascade
I know this should be possible becaus e I have seen an application developed
this way (I guess in Microsoft C++), but I am not sure what controls are
they using
I would appreciate any advice or if somebody knows where can I download a
similar sample from the net
Thanks and Best regards Tag: VFP on Linux? Tag: 180722
SQL server connection
Hello everyone.... how will i know if my sql connection
which i made from the start of the program is still active.
i need this to avoid errors that the said connection isn't
active anymore.
tnx a lot. Tag: VFP on Linux? Tag: 180692
Are there any drawbacks if I use a lot of connection to SQL Server (and not sharing them)?
Hi all,
Most of the connections I used in my apps are occupied by one SQL query
(VFP's remote view). However, in a case where I need atomic transaction, I
would share a connection and perform table insertion/update inside SQL's
BEGIN TRANSACTION and SQLCOMMIT pair.
Question:
Are there any drawbacks if I use a lot of connection to SQL Server (and not
sharing them)? Overriding the connection handle in VFP's remote views
require coding in the form's Init event. If the drawbacks are acceptable,
I'd rather bind the RVs in the DE than open it programmatically one by one.
Please note that what I mean a lot is about 10 to 25 connection (remote
view) in each form.
TIA,
Willianto Tag: VFP on Linux? Tag: 180689