Answer Questions
sic0198 Shellexecute on win98 / XP / 2003 server.
does Shellexec behave differently on win98 than on XP I have a shellexecute command to unzip a zip file. The 'pfiles' folder the zip file resides in is under the folder the application runs in: =ShellExecute(0,"OPEN","unzip.exe","pfiles\01.zip","",1) On XP machines it works fine. On win98 machines it fails because it won't find the pfiles folder. Thanks. Thanks. Sorry for not posting a seperate thread. Hi Aleniko, Shellexecute shouldn't be dependant where your application is ran from. In other words in any OS I wouldn't trust it'd resolve my current folder and explicitly pass the path. ie: ShellExecute(0,'open','unzip.exe', fullpat ...Show All
maqk appending data into an existing DBF with an autoincrement field
I have a table called special.dbf. It has a autoincrement field. I would like to append records to this file. The autoincrement field always defaults to zero and produces an error message. Any suggestions on how to append or insert records would be helpful. I would like to append using a text file or excel file from MS Access table Or import directly from Access to FoxPro. If you use insert from then you don't need drop part (or if autoinc is not in text file). 0,"field1", "field2" was a sample line from text file, it is not part of code. Insert from wouldn't help for memo, where would it come from in the first place Memo fields are not populated using "append from ..." a text file. ...Show All
UncleSam89 Strip HTML out of a memo field
What is the best way to Strip all HTML out of a memo field I can’t think of a better method than of looping thought every charter copying one at a time but ignoring those between “<” and ”>” . Is there a better way A faster way Thanks, Sammy Do you know anything about what's in there If so, you might be able to use STREXTRACT() to speed things up. Tamar Let me clarify. I want to get rid of the html code and leave only the text. I think I need the Inverse of extract() I want to delete all instances of “<xxxxx>” from a memo where xxxxx can be anything. Something like strtran() with wildcards. Thanks again ...Show All
Black Dhalia sys(6) or otrher means to know what selected printer device is.
Hi; How can I know what is the current printer Sys(6) often returns either nothing or sometimes it would return a path to the server where the app is installed. Thx. To get windows default printer DECLARE INTEGER GetDefaultPrinter IN winspool.drv STRING @ pszBuffer,INTEGER @ pcchBuffer Printername = SPACE(255) PrintBuffer = 255 lResult = GetDefaultPrinter(@PrinterName,@PrintBuffer) To set window default printer DECLARE long SetDefaultPrinter IN WINSPOOL.Drv String printername lResult=setDefaultPrinter(myPrinterName) Thanks, but im interested in the current print settings in vfp - not the default windows printer. ...Show All
cwest Is there a way to save the Local Windows?
I'm using Visual Foxpro 9 SP1. I want to save the Local Windows information during debugging. Is there a way to do it Thanks. You can save all memory variables to a file like this: LIST MEMORY LIKE * TO FILE memdump .txt NOCONSOLE MODIFY FILE memdump.txt If you don't include the "*" then you will get everything in memory, including the system variables (e.g. _ALIGNMENT etc) ...Show All
DanScan set font
i have a variable chr(18) chr(27)+chr(77) as a global variable ... now i want change my report for details font size to more smaller it dont have any effect. Gcreset = " chr(18)" &Gcreset and now i SET PRINTER FONT 'Courier New', 8 STYLE 'N' it didnt have any affect at all. Thanks in advance. ...Show All
Jaze A (simple I suppose!) grid question ....
Hi all! I used to work with VFP a long time ago and I have almost forgot most of it so I ll need your help here! :) I have a table (called myTable) with 4 fields (3 of C(20) and 1 Memo- ID,Title,Location,Descr.). When I am displaying that on a grid, I do that through a new cursor called myTable_cursor. But in the cursor I added a new field because what I wanna do is to display the first 20 characters of the memo and if the user wants then to double click on the memo cell and a new window to open and view all the memo field or edit the memo. So my problems are: 1. Whatever I put in the click event in the textbox cell in the grid (in the correct memo column) it does not respond! Any solutions here 2. I use a cursor to display ...Show All
Khurram01 Connect to Outlook Express and Microsoft Outlook
Dear Expert, Can I know how to connect to the Outlook Express and Microsoft Outlook using FoxPro Like the data in a memo feild how I connect or send out using the Outlook Express and Microsoft Outlook Or Can I generete email using FoxPro Thank you. Aleniko wrote: Can one use CDO if the SMTP server is an ISP You mean that the SMTP server is not installed locally Absolutely, all you need to know is how to access the SMTP Server. As I said earlier, the easiest way to do this is to configure Outlook Express correctly to create the necessary registry entries. Otherwise, you have to manually confiure CDO so that it can find the SM ...Show All
ernisj converting xml to foxpro table
Hi, I own an insurance and investment company and just play around with some foxpro applications for my business. I have developed several helpful database programs for such things as tracking insurance quote requests that come in, etc. in VFP ver 5.0. I just purchased VFP 9.0. I am pretty much clueless as to what xml does or how it works (i don't even know what it stands for); however, I am now in need of being able to suck data that is currently in xml format into a vfp database and vice versa. I tried playing around with the smltocursor and related commands, but they are way over my head. Is there a simple program code someone has that will just convert this for me Or is there one of you folks out there that I could hire for a small ...Show All
rc_onecall SCAN statement help
can anyone see anything wrong with this SCAN statement The compiler says theres a Nesting error b/c (im guessing) that it sees ENDSCAN but doesn't recognize the SCAN statement like it should. SCAN WHILE VarSono $ sotran.sono AND ln_counter < 50 ; FOR sotran.qtyord <> 0 ; AND sotran.qtyshp = 0 ; AND NOT RTRIM(sotran.item) == "INSURANCE" ; AND NOT LEFT(sotran.item, 5) = "SHIP_" ; AND NOT sotran.sostat = "X" for some reason the NOT... didn't work, once I took out 'NOT' and replaced the = with <> it worked. Spangltk wrote: for some reason the NOT... didn't work, once I took out 'NOT' and replaced the = wit ...Show All
Boulderdude Visual Studio 2005 Database tools problem with Fox pro 9.0 sp1 ole db provider
I have MicrosoftR Visual FoxProR OLE DB Provider 9.0.0.3504 installed. In the visual database tool, when I run "SELECT DATE() FROM MYTABLE", visual studio will give me the follow error: Error in SELECT clause: expression near ')'. Error in SELECT clause: expression near 'FROM'. Missing FROM clause. Unable to parse query text. However in visual studio 2003 on another machine, everything works fine. I tried to reinstall visual studio 2005 and the fox pro ole db provider many times. I still get the errors. Also, I remember it works on my friend's visual studio 2005. Can someone give me some help to fix this Thanks in advance. Also, "Verify SQL Syntax" returns "This command is not supported by this p ...Show All
Suwimol Random Sample
I have a table containing 3773 records, and i need a random sample of 2500 of these records. Does is there any easy way to to this w/ foxpro or do i have to come up w/ an algorithm myself Thanks in advance, Mike rand(-1) select top 2500 rand() as randomVal, * from myTable order by 1 into cursor random2500 The Rand() function will let you do this. Something along these lines: * Assume nNumToPick is the number you * want to select * Seed RAND() RAND(-1) * Set up a cursor to know which records you * already have. PK here represents the primary * key for your table. SELECT PK, .F. AS lChosen ; FROM YourTable ; INTO CURSOR Picked nRecCount = _TAL ...Show All
PhilipHaugaard using Textbox control...
Hello friends... I am new to visual foxpro. I have been learned programming in Foxpro 2.6 for Dos.. Now I want to learn visual foxpro.. I had make just a simple form with one textbox and two command buttons. I just want to do if I click command button1 then textbox show today's date and if I click command button2 then textbox show currunt time... What codes I have to write in command button1 and 2 Need your help...thanks a lot Or you can add timer into form and put this code into timer method thisform.textbox1.value=DATE() thisform.textbox2.value=TIME() Then all you need is to set the interval property to whatever you want in milis ...Show All
cgraus How to calculate the data connection time?
I tried to add 2 fields, time_on, datetime, time_off, datetime to calculate user's log on time in the Users.dbf. How do I calculate the total time between the 2 value Any better way to capture users' activity To do date math you can't use time() as that returns a string. Best is to create DateTime fields and then subtract datetimes. You get the number of seconds. Easy to have a function or procedure that returns values you can use (in hours-minutes, or days, or whatever you need). What is the format of time_on,time_of Standard Like: 01/22/2007 12:00:00 AM Seconds2TimeStr( time_off - time_on ) Function Seconds2TimeStr Lparameters tnSecond ...Show All
NET PR Runtime Files for Visual Foxpro 5
Does anyone know what runtime files are to be included in a Visual Foxpro 5 application for distribution Thanks. That's a very old versionthat I have not seen in many years. If I remember correctly you need VFP500.DLL plus whatever language runtimes if your destination language is other than English. Hopefully somebody else will chime in if I'm wrong. Anyway, all you have top do is use the deployment wizard and it will take care of preparing the proper runtimes for you. For best results include: foxtools.fll vfp5enu.dll vfp500.dll ...Show All
