Import csv file and keep trailing spaces - URGENT REQUEST
I have an urgent need to import a csv file and some of the data has
trailing spaces which I have to retain and later use this data intact
by sending it to a printer.
Every time I import the data I lose the trailing spaces.
An example of the file with 6 fields is below:
IDNO, LNAME, FNAME, code1, code2, code3
1033501, ALEXANDER, JOHN,1,PAQVSBUJA0 .9W20.WPSUG8J7P9YA,15071
1007267, ALEXANDER, BILL,1,PA1QSBUJA0 .9W-.V0PSUG8J7P7ZU,31910
1032692, ALEXANDER, JEAN,2,PAQVSBUJA0 .9W-9.-ZSUG8J7RGT9,32216
1032027, ALEXANDER, PAUL,1,PAQVSBUJA0 .9W2ERYPSUG8J7R - ,12386
Note that the code 3 field sometimes has a record with a trailing space
(see last record)
Can anybody advise how I should go ?
Thanks. Tag: Report Listener Tag: 227700
More on Data Sessions for a Function
Josh, Thanks.
I've been playing and it seems that the following are true:
CLOSE DATABASE will close table in the current session
RELEASING a session will close the tables in that session
DISPLAY STATUS will show you open tables in the current session
DISPLAY OBJECTS will show you sessions (and other objects)
Do I seem to have it correct?
My functions that want private data should simply save the session coming
in, create a new one, release the created session, and then restore the
saved one prior to returning. I don't need to close tables. Releasing the
session does it for me. Correct?
Also, my SET EXCLUSIVE and SET DELETED seem to be preserved across
datasessions created in code as you outlined so they do not need to be coded
again when a new session object is created. Is that correct?
Thanks again.
Jeff
"Josh Assing" <XjoshX@jassing.com> wrote in message
news:cvksj2teihmhvc5kirr1avc3gr197kkuvb@4ax.com...
> >Is there an easy way to do the same thing for a function?
>
> yes.
>
> it's called a (ready?) data session
>
>
> Here's how to do it in code.
>
> lnCurrentSession = SET("datasession")
> loSession=CREATEOBJECT("session")
> SET DATASESSION TO losession.DataSessionId
>
> * do your stuff here
>
> set datasession to lnCurrentSession
>
> * Back to where you were.
>
>
>
> --- AntiSpam/harvest ---
> Remove X's to send email to me. Tag: Report Listener Tag: 227677
Copy cut paste hotkeys not working in zoomed memo window
I have a Zoom button class that opens a given memo field in a separate window
and allows edit. My problem is the copy cut paste hotkeys don't work inside
this window - you just get a little blob appearing. Using the menu option to
copy cut paste inside the window works fine. The hotkeys work fine insdie the
edit box on the main screen ok, it's just inside the defined window that they
don't.
Any ideas how to fix this?
Thanks,
Bernie Beattie Tag: Report Listener Tag: 227674
MDAC
I am currently running with MDAC version 2.53.6306.0 in Windows 2000.
Can you suggest a reference that would outline any problems I may have
working with Foxpro V 6.0 if I upgraded MDAC to 2.6 or higher?
Thanks Tag: Report Listener Tag: 227669
CloneObject
hi,
I want to create a new copy of object instead of using the
reference of the object like
objA=objB.
When I tried to search for this I encountered with
NewObject(),
cloneobject(),
AMembers()
could be used for this purpose. But I couldn't understand how the
NewObject could be used.
For the CloneObject, since it is available at only the design time it
is not going to serve my purpose.
For the AMembers() method it was giving errors when I was copying for
the read only properties, so if I try to use the filter, it is giving
me an error of Incorrect argument even though I use it as specified in
the Microsoft help.
Here the object toForm is also present. It gives the error for the
last argument of [P | H | G] , but really astonishing thing is that it
will not give any error if I use [P] only here.
=AMEMBERS(laArray,toForm,1,[P | H | G])
Please suggest me an example with code of how a copy of an object could
be done in VFP9.
Thanks Tag: Report Listener Tag: 227664
Capturing Right Clicks on a Menu
can any one tell me how i can capture CTRL+SHIFT + a right mouse on a menu
item...
specifically in our security design, we have enabled the CTRL+SHIFT+Right
Mouse Click to add a form or a control into the security structure so access
can be defined for it....
rather than have to manually create entries, i would also like to capture
the CTRL+SHIFT+Right Mouse Click when their on a menu to add the menu item
into the security mix....
any ideas? suggestions? Tag: Report Listener Tag: 227663
run not registered dll made with VFP on internet server
VFP7 XPSP2
Is there a way of running a DLL compiled with VFP on internet server without
rigistering the DLL On the server?
Samir Ibrahim Tag: Report Listener Tag: 227661
How to output to Word format?
Anyone know of an easy way to take an existing system and output existing
reports in Word format? This system generates about 40 reports. Is there any
type of printer driver setup that outputs in Word/RTF? Any ideas? Tag: Report Listener Tag: 227652
Need to print certain pages for a copyright regsitration.
Some of you have been through this. I am in the process of copyrighting a
program I have written. The copyright office wants the first 25 and last 25
pages of the program.
You used to be able to see the entire application in one file. Can you stil
do this? How do I see the entire program code in one file? The App is made up
of over 50 programs and forms and reports, etc.
TIA Tag: Report Listener Tag: 227649
MS Access ODBC driver (VFP 9.0)
When I use sqlconnect() and choose MS Access the driver prompts for the
location of the MDB. However, the file dialog does not include Application
data. How can this be avoided? Tag: Report Listener Tag: 227642
Handling apostrophes in strings?
Hi,
I'm using VFP 9.0 and have run into a little problem when storing names in
strings. If I have a contact's address with a street name like, O'Keefe
Ave, do I have to do anything with the apostrophe to keep it from
premeturely terminating the string?
What I'm doing is scaning a table and exporting records to an Access
database using ODBC and SQLEXEC(). To do this I'm building a string for the
values component of an INSERT statement. Like this...
myString = myString + "', '" + myTable.addr_1 + "', '" + myTable.addr_2 +
"', '" + myTable.city + "'"
What would be the best way to handle this on the fly? Or, is there a better
way to perform my task?
Any help is greatly appreciated,
Linn Tag: Report Listener Tag: 227633
Launching Internet link from memo fields
I find this works in VFP 7.0 and 9.0, but when running from runtime it
doesn't work. Is it only available when run from the development
environment? Thanks.
Dan Tag: Report Listener Tag: 227625
strange behaviour of form environment
I have a form with three tables in the environment, standord, accounts,
and utility.
The INIT selects standord and creates an array which fills a listbox.
This is OK and the form appears as it should, If I then SUSPEND and ?
ALIAS() it tells me that utility has been selected. If I then SELECT
STANDORD it tells me that standord does not exist. I have even made a
temporary textbox which INIT fills with the alias in its last line,
which show standord. But without any other action except suspending it,
the table changes.
There is nothing in the INIT which calls utility and there is no coding
in ACTIVATE or anywhere else that I can find (for example in the class
structure) which could select utility. Nowhere (until much later in the
calling prg) do I remove standord from being used.
Can anyone suggest what might be happening ? I need to select standord
for the form to do some processing.
--
Tim Hobson Tag: Report Listener Tag: 227624
Meta-Data or Actual Data
Hey All,
I want to fetch the number of records in a given table via the ODBC
driver. This is not related to any particular query... Just some
"statistical" information. (IE, you have 10,000 contacts in your database)
I know I can use the RECCOUNT() function in FoxPro "native"... Which I
assume pulls from the metadata of the table. Is there an equivilant for
the ODBC driver (other than a SELECT COUNT() FROM Table, which I assume
reads every record in the table)
Thanks!
Matt Tag: Report Listener Tag: 227623
setall() & .Nulldisplay
I'd like to use thisform.SetAll to set all the nulldisplay properties to a
value that makes control.values look blank, but I can't find the right combo
of equal signs, quotation marks and square brackets to do it. =space(1) in
the property sheet and similar just move the insertion point to the end of
the invisible space when the control gets focus. I'd rather not use set
nulldisplay since a global setting has effects elsewhere.
-Lew Tag: Report Listener Tag: 227621
Quicken or Money to VFP
What's the shortest programmatic route from either of these to VFP? Are
there free api's? Any good?
--
-Lew
The workers took the robot for Maria. Tag: Report Listener Tag: 227614
updates?
Anyone know the scheduled release date for the "official" SP2 for VFP9? I
hear there are problems with the current beta SP2.
What about Sedna? When? Are there good things in there that make it worth
spending the time to look at the beta? Tag: Report Listener Tag: 227606
Registration or Activation Code engine
Does anyone know where I can get some kind of Registration or Activation
Code generator and engine for my VFP 9.0 applications?
Thanks.
-Paul Tag: Report Listener Tag: 227604
What else is there like VFP?
The original dbase and to some extent all of the xbase descendants like VFP
are interactive, adhoc, one-command-at-a time, data creation, data
examination, and data manipulation languages.
Starting with a few commands in the Command Window, you can feel your way
into a problem and eventually build a program with reports, queries,
screens, etc. xbase is like a giant calculator with a ton of functions.
My question is, is there any product or environment out there that has the
same simplicity and flexibility as xbase?
Should one be learning or experimenting with some other programming
environment? (esp. if VFP wanes). What would it be? Tag: Report Listener Tag: 227600
Rotation tab
How come I don't see a "Rotation" tab when I select a label on the report
header and choose property?
I use VFP9 SP1
thanks
HME
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com Tag: Report Listener Tag: 227599
send CTRL and "+" to application
VFP7 XPSP2
I have known lately that sending CTRL and "+"' to a grid or listview will
automatically adjust column width in the grid (Windows Shortcut).
how i can send CTRL and '+' using KEYBOARD in VFP?
I found this code to for C
SendKeys.Send ("^{+}");
http://www.codeproject.com/cs/miscctrl/AutoResize.asp
Thanks in advance Tag: Report Listener Tag: 227589
Updating Balance Field
Hi,
Just want some suggestions on the following issues. I currently have a
Balance Field in
my Invoice.DBF that gets updated with every payment. In a multi-user
environment,
I encountered a problem when the balance field was updated by two different
user, with
both user entering different payment amount. The balance was incorrect
because the
calculation was based on the user that last saved the data.
eg.
Invoice amount : $1,000
Invoice Balance : $1,000
User 1 - Entered $400 as Payment
User 2 - Entered $500 as Payment
Both user was entering their data at the same time, User 2 being the last
to click the save button.
Invoice Balance : $500 (which should be $100 only)
I really need to maintain the Balance Field so I could trace which invoice
is still unpaid.
There are times that the clients pays only the latest invoice so I could not
implement
a running balance on the program.
Thanks for any ideas or comments you can give. Tag: Report Listener Tag: 227588
Table buffering issues VFP 7 SP1
Hi all,
One of my forms is using table buffering and the records are filtered using
SET KEY. If two users are adding records in a grid, users A data may show
on users B screen. I remember hearing somewhere this may be a bug. If it
is, is it fixed in VFP 8 or 9.
I am thinking this is a bug since the data is being filtered and the key
value for the filter is different on both machines, also table buffering is
involved here so why would one user see another users. Though I am not sure
if user A saved before user B saw the data or not.
VFP 7 SP1 on WinXP Sp2 and Win2K workstations.
And yes we are thinking of going to version 9 sometime.
Thanks for any input
Tom Tag: Report Listener Tag: 227582
SAPI Memory Leak
I am using SAPI V5.1 speech recognition in my VFP8 based application. I
have noticed that this automation server (sapisvr.exe) keeps using more
and more memory. Is this a memory leak or is this normal? The only way
to release this memory is to re-start this process.
Some of the details are as follows...
1. My OLE, implementing the SAPI events, is session based. I have also
ensured that all 'CreateObject()' based objects are made NULL before
the object references are released.
2. I have created one Public variable that references a 'container'
class based object. All the objects that are required for this SAPI
(and created thru createobject command) are referenced thru the custom
'properties' of this container object.
3. The application uses CFG only for short periods but is in dictation
mode for most of the time.
Thanks
Sati Tag: Report Listener Tag: 227581
DEFINE WINDOW
This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C6F9C9.60C9F9F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
When I used in FPW 2.6:
DEFINE WINDOW bro at 12,2 SIZE WROW()-13,1.09*WCOL() noclose FLOAT =
NOZOOM GROW
I got a window with three pull-down options on the upper left corner:
Move Ctrl+F4
Size Ctrl+F8
Next Window Ctrl+F6
but in VFP 9 the same command just gives
Move (wihout CTRL)=20
Size (without CTRL)
and there is no "Next Window"
How come this different behaviour. How can I achieve my old FPW 2.6 =
behaviour?
------=_NextPart_000_000E_01C6F9C9.60C9F9F0
Content-Type: text/html;
charset="iso-8859-1"
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=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>When I used in FPW 2.6:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>DEFINE WINDOW bro at 12,2 SIZE=20
WROW()-13,1.09*WCOL() noclose FLOAT NOZOOM GROW</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I got a window with three pull-down =
options on the=20
upper left corner:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Move Ctrl+F4</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Size Ctrl+F8</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Next Window Ctrl+F6</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>but in VFP 9 the same command just=20
gives</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Move (wihout CTRL) </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Size (without CTRL)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and there is no "Next =
Window"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>How come this different behaviour. How =
can I=20
achieve my old FPW 2.6 behaviour?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_000E_01C6F9C9.60C9F9F0-- Tag: Report Listener Tag: 227579
Varchar mapping, varchars & sql
I'm having difficulty with the following concept. Does anyone have the
patience to explain it?
Situation: I have a table in which all of the char fields are type varchar
and my app runs with varcharmapping on and set exact off . When it comes
time to run a few simple queries I get rows with blank values when the where
clause compares one of these fields to a character literal like
where extension = "PJX"
I have already determined that I can get the results I expect if I change
this to:
where extension == "PJX"
but I can't understand how or why comparing an empty column value to a
non-empty string can return .t. since the command line statements:
? "" = "PJX" && -> .f.
and
? "PJX" = "" && -> .t.
both make perfect sense to me, but the query suggests that "" = "PJX" is
true. (VFP9/sp1, enginbehavior 90 if that makes a difference).
-Lew Tag: Report Listener Tag: 227574
Calling a form in a do while statement
If I am calling a do while statement on a command button in the Click event
and say I'm processing 6 records and I insert a case statement that calls a
form based on a case statement does the do while stop at that point then
continue after the form is executed or continue? I do make the form
enabled=.f. before I call the new form. How can I control the program code
if at all if it does not stop?
Thanks
--
Rusty Gallo
OGES Systems Tag: Report Listener Tag: 227572
date format
now the date format is 23-10-2006,
my client want it to be 23-Oct-2006
Any simple method to do ??
Thanks a lot Tag: Report Listener Tag: 227558
setup in genmenu.prg: grrr!
I have a prg, setup.prg, which I run at the beginning of every application.
Every now and then, however, the nasty, little setup function in genmenu.prg
runs in it's place. I haven't a clue as to why this happens. Genmenu's
location isn't in my path statement and I don't have any rogue set procedure
statements. Any ideas?
-Lew Tag: Report Listener Tag: 227552
Porting FoxPro 2.6 Windows app to VFP 9
I can find references to porting to VFP 6 but not with VFP 9. I guess
it is not very common. I wonder how much work is involved?
Does anyone have any experience with this or can offer a suggestion on
what to watch out for?
Thx,
Long Tag: Report Listener Tag: 227549
Can I Intercept List.Click Before Pointer Moves
VFP9
When the user clicks in my list (object), the record pointer changes
and the new record is displayed just fine. Here's the setup code for
the list:
WITH .List1
.ControlSource = 'Jobs'
.RowSourceType = 6 && 6=Fields
.RowSource = 'Jobs.ModelName'
ENDWITH
Is there some event that occurs after the click but before the record
pointer moves? Here's why I ask:
I want to "intercept' the Click event and/or the Up/Dn arrow keys
before the pointer moves so I can detect if any changes were made to
the original record.
I tried code in the InteractiveChange & Click events, but it seems
these events occur only AFTER the record pointer moves to the new
record. I also tried using the Valid event, but Valid doesn't seem to
fire at all.
I eventually kludged it to return to the original record to detect the
changes, then back to the newly selected record, but I feel there must
be a better way. Is there?
Steve M. Tag: Report Listener Tag: 227548
Update query on an access database
I am trying to run an update query on an access database from FoxPro,
and I keep getting the error:
Too few parameters. Expected 1.
I can connect to the table and run a select with no problem. The query
I am running is:
retval=SQLEXEC(ODBChandle,"update [addresses - MASTER LIST] set
zip='&tmpVal' where idnumber=2879")
I have tried just about every combination of brackets and quotes that I
can think of. I have also tried hard coding a value instead of using a
macro. Nothing works.
Kevin Clark
Seton Home Study School Tag: Report Listener Tag: 227545
Grid and Combo Box weirdness
i have a grid with a combo bow on a column
the combo box recordsourcetype is set to values and the values are
Full,View,Hide which is tied to a numeric column and sparse is false
when the the form loads the data all appears correct and the Full,View, or
Hide text shows up properly in the combo box
however, when i change the selection in any of the combo box's, all the
combo's switch to showing just the first letter of the text, like F,V or
H....
any idea whats happening or how to fix this? Tag: Report Listener Tag: 227541
How to make One 2 many relationship when use remote view.
Dear all
I 'm a newbies for use BackEnd Oracle. I was started develop
accounting application by VFP9 for front end and Oracle 8i for BackEnd.
Due to i no have exprerience about Oracle. Then i scare and no
understatding how-to. My point is very clear : When you use foxpro
table you can use SET RELATION to make an One 2 many relationship but
How to do in Remote views? Please give me more detail suggestion and i
hope to get answer as soon as possible.
Best Regards,
R. Prawit
Bangkok/Thailand. Tag: Report Listener Tag: 227529
Chado Spell-Edit
Has anybody got any experience of mail-mailing in vfp using the Chado
Spell-Edit activex control?
The Merge event does not seem to be firing, and Chado, whilst being very
courteous and helpful, are not able to solve the problem because they have
no vfp expertise.
Many thanks
Stephen Tag: Report Listener Tag: 227528
SQLSETPROP / DisconnectRollback
in
http://msdn2.microsoft.com/en-us/library/dtytxez4.aspx
Microsoft describes the new property <DisconnectRollback>
in VFP 9.
When for example the system crashes open transactions
are rolled back. The default setting does not do that
and also the previous VFP Versions dont support that.
Unfortunately I have to develope some projects
with older versions of VFP than version 9.
So my question is:
Is it possible to achive the same effect by using
for example ODBC-API functions like
o SQLSetConnectOption oder
o SQLSetConnectAttr
o ...
If it is possible how is it done exactly ?
I tried to debug this by using an open source
odbc-driver but none of the exported functions was
called when executign the command:
SQLSETPROP(oApp.hCon, 'DisconnectRollback', .T.)
Many thanks in advance
Lutz Tag: Report Listener Tag: 227527
Killing a process
I found some code on here a while ago ( i can't remember who posted it),
which allowed you to kill a named process on a computer. As i was creating a
new part of our package that lived in a seperate executable at that time, i
decided to incorporate it. i recently found that the code had a slight flaw
when used in a terminal server environment, where it will kill everyones
process, not just the process for the user who was running it. So i did some
research and came up with the following.
PROCEDURE kill_it
LPARAMETERS what_to_kill
LOCAL user,domain,m.lcsystemstring
oWMI = GETOBJECT('winmgmts:{impersonationLevel=impersonate}')
cQuery = "select * from win32_process where name='" +ALLTRIM(what_to_kill)
+"'"
oResult = oWMI.ExecQuery(cQuery)
FOR EACH oProcess IN oResult
m.user = ""
m.domain = ""
If oProcess.GetOwner ( @User, @Domain ) = 0
m.lcsystemstring = SYS(0)
IF TYPE('m.user') = 'C' AND ALLTRIM(SUBSTR(m.lcsystemstring,AT('
#',m.lcsystemstring))) = ALLTRIM(m.user)
oProcess.Terminate(0)
ENDIF
endif
NEXT
endproc
which sounded fine, and works a treat on my local machine. however under
terminal server i get an error for some users.
ERROR: (1440) OLE exception error: Exception code c0000005. OLE object may
be corrupt
The error occurs when trying to make the getOwner call, which occording to
the documentation should return a number other than 0 if it fails. instead
it occasionally errors. This behavoiur would appear to be a security issue,
as so far it only happens to people with user rights on the terminal server
environment. So in order to get over this, i will now have to trap this
error, which should never have happened in the first place! unless someone
knows a work around or another way of achieving this?
anyway i hope this saves someone else some heartache.
Mark Burgum Tag: Report Listener Tag: 227525
VFP: Finding Name of Executable
I am using Adobe Acrobat to print to PDF. To do this, I have to
write to the Registry the name of the executable. How do I determine
this? My thoughts so far:
If the app is running as a collection of .fxp files under VFP,
then VFP is the actual executable. How do I find out the name of the
VFP executable? (I mean the name of the .exe that is VFP.)
If the app is running as an .exe, then sys(16,1) does it.
If the app is running as an .exe under VFP, then VFP is the
actual executable (I think). I can distinguish between this case and
the one before using version(2).
I think there might be other possibilities such as .app. (I have
never used a .app, nor do I even know how they are created.) There is
also the possibility of one .exe calling another and on and on. If I
have the first three above, that should do it for my case, and I need
them anyway before experimenting with the rest.
This is somewhat important as my app printing will not work
properly under the full VFP. This means that I would not have access
to the debugger and that I would have to build the .exe each time I
want to test anything to do with PDF printing.
Here is my code so far:
***** Start of Included Code *****
* tryname
* Try to Get Name of Executable
* Last Modification: 2006-10-25
? "*** Execution begins."
set talk off
local sys16name, apptype, underruntime, vfpexe, appname
sys16name=sys(16,1)
apptype=upper(right(sys16name,4))
underruntime=version(2)=0
vfpexe="***insert name of VFP executable***"
do case
case apptype=".FXP"
appname=vfpexe
? "running as .fxp under "+appname
case apptype=".EXE" and !underruntime
appname=vfpexe
? "running as .exe named "+appname
case apptype=".EXE" and underruntime
appname=sys16name
? "running as .exe under "+appname
otherwise
appname="???"
? "running in unknown state"
endcase
wait
? "*** Execution ends."
return
***** End of Included Code *****
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices. Tag: Report Listener Tag: 227522
Coming from FPW 2.6 (2nd part)
1) I am migrating my old FPW 2.6 application to VFP 9 just as it is, and
when I use the BROWSE command I see on screen that the columns are not wide
enough to comfortably accomodate the strings. However, if I double-click
with the mouse on the square in the upper left corner just under the title
bar of the browse window, all the columns become wider, and can be read
easily. How can I achieve the same without intervention of the user by
double-clicking? Is there a command that I can include in my program ?
2) when I issue REPORT FORM xxxx PREVIEW NOCONSOLE the report opens by
default in a non-maximized window. How can I zoom to maximize without having
to handle the mouse?
How can I close the preview window by pressing Escape instead of clicking on
the little window with the open door?
TiA
Walter Tag: Report Listener Tag: 227512
Bug in VFP 7 SP1 to watch out for!!!!
Am I the only one who didn't know this?
I have some test code that creates text files that begin with the letters CO
and have no extension. So these files would be "CO*."
When I do a directory for these files using
DIR CO*.
I get a list of the text files that I created.
When I then type
ERASE CO*.
it does the same as if I had typed ERASE CO*.*
I don't know if VFP 9 is similarly affected but this could be potentially
very bad. Of all commands in the world that should know the difference
between xxx*. and xxx*.* erase would be the most important.
Also, VFP's erase does not put things in the recycle bin. In my case,
everything important was backed up so no real trouble was caused.
This is, in my opinion, a very bad bug.
Jeff Tag: Report Listener Tag: 227509
Grid.ActiveRow problems
Under VFP 9 I have a data grid linked to a table of line items for a sales
order.
Whenever I go to use the GRID.ActiveRow property it returns a number 1
greater than the number of order item records being displayed (filtered); no
matter which row is highlighted or which row is active - e.g. 3 order item
records ActiveRow returns 4 no matter which row is selected.
ActiveColumn is returning the correct value.
Any ideas as to what is causing this.
What I am trying to do is automatically add a new record when the user is
positioned on the last record and last column and presses Enter, instead of
having them click a button to add the line.
--
Regards
Bob B. Tag: Report Listener Tag: 227506
COM+ over the internet
VFP7.0 XPSP2
I want to creatre a com+ server which fetch data from dbf file (exist on
internet server) depending on a query , then the result is exported to xls
file. then i will download this file to local pc, then import the data from
xls to dbf at client pc and show him the result.
1- how i run the com+ server over the internet from client pc ?
x = createobject("mydll.myclas")
X.RUN_QUERY
2- in my local pc i use the following code in a procedure in the class:
USE c:\mydir\mydbf.dbf in 0 shared
what is the command i should use to open a table in internet server?
USE \internetdir\mydbf.dbf in 0 shared <-- is this correct ?
here is my code
DEFINE CLASS EXPORT_TO_XLS AS Custom OLEPUBLIC
PROCEDURE RUN_QUERY
SET EXCLUSIVE OFF
USE c:\mydir\mydbf.dbf IN 0 SHARED
SELECT UNIQUE_ID, TITLE FROM mydbf WHERE PLATFORM = "PC" INTO CURSOR XXLIST
SELECT XXLIST
EXPORT TO c:\MYDIR\OUTPUT.XLS TYPE xls
USE
SELECT MYDBF
USE
ENDPROC
ENDDEFINE Tag: Report Listener Tag: 227500
oleServerBusyRaiseError
Does anyone know if you can trap these errors in anyway. I have a .exe which
I create within a Custom class object. I would like to trap any busy errors
either within the error routine on the custom object or handle it within the
.exe. As this is all new to me and the help isn't particularly helpful I am
struggling a bit. currently with this property turned on a get an occasional
RPC server error which is not very helpful. and if its off I occasionally
get my .exe going completely non responsive causing a hang in the main
application.
I am currently using VFP 8, but even a fix for 9 might help, as we may well
be moving to that soon.
just for the record the main reason it is going none responsive is because
the executable is a phone server using Tapi lines via remote Tapi and a
third party activex. We occasionally get problems where this setup goes
completely none responsive, and I am unable to do anything tapi related,
even with other tapi utilities. I am unsure if the issue is with the TSP on
the server, the remote tapi implementation or the actual phone switch. as
everything else seems to be working at the time. however rebooting the
domain server cures the problem. however I don't expect a resolution to that
issue here, as its not a FoxPro issue. just wanted to fully explain the
problems.
thank you in advance for any help you can give me
Mark Burgum Tag: Report Listener Tag: 227499
VFP9 Sp2
Dear All,
I installed VFP9 Sp2 and I had problem with BROWSE command, so I
reinstalled VFP9 and Sp1. Now the BROWSE command is OK, but I cannot create a
report.
I have the following error when I want to insert a new field: Variable
"VPOS" is not found.
Before, I did not have any problem with my VFP9 Sp1.
Could anyone help me?
Many thanks.
--
Sandor Tag: Report Listener Tag: 227493
Directory Listing
Is anyone able to advise how to obtain a detailed directory listing from
within Foxpro 6 and save it into a text file? Tag: Report Listener Tag: 227491
WSDL ... SOAP .. Fox 6
Windows XP
FoxPro 6 sp5
Hi,
I need to know if this is possible in Foxpro 6 (the code is Csharp)
using System;
using System.IO;
using System.Net;
using System.Xml;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using java.io;
using java.util.zip;
namespace MISI.Sapiens.Client {
public partial class Main : Form {
public Main() {
InitializeComponent();
}
private void _btSend_Click(object sender, EventArgs e) {
// validate the xml
XmlDocument xml = new XmlDocument();
try {
xml.LoadXml(_tXml.Text);
}
catch(Exception) {
MessageBox.Show("Invalid Xml.");
return;
}
// get an array of bytes from this xml
byte[] buffer = Encoding.UTF8.GetBytes(xml.OuterXml);
// compress the xml into a memory stream
MemoryBuffer memory = new MemoryBuffer();
ZipOutputStream zip = new ZipOutputStream(memory);
// create the zip file entry
ZipEntry entry = new ZipEntry("XPTO.xml");
entry.setMethod(ZipEntry.DEFLATED);
zip.putNextEntry(entry);
for(int i = 0; i < buffer.Length; i ++) {
zip.write(buffer[i]);
}
zip.closeEntry();
zip.close();
// read the compressed bytes from the memory stream
memory.Stream.Position = 0;
buffer = new byte[memory.Stream.Length];
int bytes = memory.Stream.Read(buffer, 0, buffer.Length);
Prototype.Prototype ws = new Prototype.Prototype();
ws.PreAuthenticate = true;
ws.Url =
String.Format("http://{0}/XPTO.sapiens.webservices/prototype.asmx",
_tServer.Text);
ws.Credentials = new NetworkCredential(_tUser.Text.Split('\\')[1],
_tPwd.Text, _tUser.Text.Split('\\')[0]);
MessageBox.Show(ws.Upload(buffer));
memory.Stream.Close();
}
}
}
TIA,
ATSP Tag: Report Listener Tag: 227479
Private Data for a function
Hello and thanks in advance for the help.
If I design a form that uses a private data session, I open and close the
tables within the form and everything in the default data session is left
alone.
Is there an easy way to do the same thing for a function?
I know I can USE AGAIN with a new ALIAS and then remember to clean up but is
there a simple way to tell VFP that a function uses its own data that is
separate from anything that might happen to call it?
Thanks,
Jeff Tag: Report Listener Tag: 227469
Comment macro or Intellisense script
I'm writing a code documenting automation routine & I need a routine that
will take a highlighted block of code or text and prefix each line with a
short character string of my choosing ... like the Comment/Uncomment options
on the Format context menu. I've tried a macro using ctrl-x, alines() &
keyboarding the prefixed lines back into the code, but I can't get it to
work reliably. Other suggestions?
TIA
-Lew Tag: Report Listener Tag: 227466
can someone give me an example of using the report listener with multiple
report, with varying orientation?