Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

FoxPro

Visual FoxPro (VFP), and its predecessor FoxPro, is a data-centric, object-oriented, procedural, database programming language and IDE from Microsoft last released in 2007 that still has some active use due to its low cost of deployment and fairly rapid development. In 2008, Microsoft released a set of add-ons for VFP's xBase components to allow interoperability with various Microsoft technologies. It allows data processing against its native file-based data tables or database servers such as SQL Server.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am trying to automate an excel file generation from VFP9  that will have subtotals...

Any help ?

Thanks
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hi,

Currently, we use a template on VFP and we get our data from a Visual FoxPro database. So, we have fields on this template directly from the database. Then, we convert this template to PDF.
Our clients use our invoicing system - what we now want is to link these invoices to a statement. So, we want to create a new field on the database and use that field on our template to store the path of the invoice linked to the statement.
When we convert this template to PDF, we want to be able to access the path as a hyperlink. So if we click on that invoice, it opens up the invoice wherever the path is pointed to.

Please assist or alternately advise on a better method. You can also email me - shamina@oficinagroup.com

Many thanks,
Shamina
0
Hi Experts

Could you detail what's going in  unofficial VFP patches that are still under development
and  in official VFP tools that are still supported by the community, also?

Thanks in advance!
0
Hi Experts

I need to use a printer DLL ( Mp2032.dll ) that  drives a printer guillotine after a ticket print.
The manufacturer gave this VB code to do the job:

Accordingly to (in Portuguese):
Manufaturer instructions


Public Declare Function AcionaGuilhotina Lib "MP2032.DLL" (ByVal Modo As Integer) As Integer Public Declare Function ComandoTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal Flag As Integer) As Integer

'After declare the functions, to execute ComandoTX, do like that:

'To drive the guillotine
sComando = chr(27) + chr(119) 
iRetorno = ComandoTX( sComando, Len( sComando )

'or I guess, optionally

iRetorno = AcionaGuilhotina(1)

Open in new window


Could you give me a way to convert this VB printer driver to a corresponding VFP one?

Thanks in advance!
0
Good Afternoon Dear Experts.

I am trying to set up a VFP communication with a Webservice WSDL.
At the same time, I'm developing in .NET and I have the following code:

        Dim client As ISession2.Session2Client = New ISession2.Session2Client()
        Dim session As ISession2.SessionOpenResult = client.Open(Nothing, ISession2.WsRemoteClientTypes.WebserviceClient)
        If (session.ErrorMessage Is Nothing And session.SessionId IsNot Nothing And session.Status = "cmdDone") Then
            Dim logOnArgs As ISession2.SessionLogOnArgs = New ISession2.SessionLogOnArgs()
            logOnArgs.UserName = "WebService"
            logOnArgs.UserPassword = "password"
            logOnArgs.StationName = "WebService"
            logOnArgs.OwnerName = Nothing

            Dim logOn As ISession2.SessionLogOnResult
            logOn = client.LogOn(session.SessionId, logOnArgs)

            If (logOn.ErrorMessage = Nothing And logOn.Status = "cmdDone") Then
                Dim sessionID = New Guid(session.SessionId)
                Dim material = New IMaterial.MaterialClient()

                Dim getMaterialResult = material.MaterialExists(sessionID, "materialID")
                If (getMaterialResult IsNot Nothing) Then
                    MsgBox("material  found")
                Else
                    MsgBox("material not found")
                End If
            Else
                MsgBox("Error Log On: " & logOn.ErrorMessage)
            End If

        Else
     

Open in new window

0
When using the following select statement empty strings are desired in columns where YEAR(dateFields) = 1900.  This works fine if the first record in a dateField column does not contain 1900, meaning we get dates where desired and empty strings where year = 1900.  If the first record does contain 1900 the entire column for all records is populated with either an empty string or a 0 or a 1.  In the screenshot you can see that, as desired, column FirstInv starts with a valid date and displays an empty string when YEAR(FirstInv) = 1900.  The issue is demonstrated in the columns Ship and SoftClose, both having first records with YEAR(Ship) and Year(SoftClose) = 1900.  The entire columns results are either empty strings, 0 or 1.  

 Results.png
SELECT ALLTRIM(ChildJobNum) AS JobNum, ALLTRIM(JobDesc) AS JobDesc, ;
      ALLTRIM(AccountManager) AS AcctMan, ;
      ALLTRIM(ProjectManager) AS ProjMan, ;
      ALLTRIM(DisplayType) AS DisplayType, ;
      ALLTRIM(BoothType) AS BoothType, ;
      IIF(YEAR(dtOrdered)=1900,'',DTOC(dtOrdered)) AS Ordered, ;
      IIF(YEAR(dtShip)=1900,'',DTOC(dtShip))AS Ship, ;
      IIF(YEAR(ShowEndDate)=1900,'',DTOC(ShowEndDate)) AS ShowEnd, ;
      IIF(YEAR(dtSoftClosed)=1900,'',DTOC(dtSoftClosed)) AS SoftClosed, ;
      IIF(YEAR(dtHardClosed)=1900,'',DTOC(dtHardClosed)) AS HardClosed, ;
      IIF(YEAR(dtFirstInv)=1900,'',DTOC(dtFirstInv)) AS FirstInv, ;
      ProductionLeadTime, ReturnTime, ProjectCompletedTime, NotSoftClosed, AccountingReviewTime, NotClosed, ;
      InvoicingTime AS …
0
Hello,
with another question about my Foxpro9 installation under W10pro64 I was helped quickly on this platform and hopefully someone has the right idea about this question:
I wanted to get away from the old WinXP and ported an old VFP9 program to SQL Express 2017 in W10pro.
So far I successfully installed SQL Express 2017 and on a Lan Client the VFP9 program ist working well.
Just on the Server itself the VFP program ist working only partially meaning that all "normal" data can be accessed just the calendar which is handled by dayview.ocx gives me a blank page with an error: "SQL server not found"
I connect VFP to SQL as user "sa" via ODBC and SQL Server Native Client 11.0
Apparently the activeX plugin makes a difference if data is via LAN rather than from the local host.
Does anybody have an idea what to do about this?
I already switched off windows firewall without change.
Thanks ahead for your replies!
0
Hi, I need assistance with the question above. I'm developing an application for a doctor who does not want confidential patient information to be stored on Remote Desktop. The doctor wants to store the file path from the local computer on TS and whenever she wants to access the file it fetches from local computer using the path, opens on RDP but doesn't save it there - it's just for viewing purposes. If the application is accessed from another computer, the path won't be the same and therefore should throw an error.

Urgent help please.
You can also email me - shamina@oficinagroup.com
Really appreciate it.
Thank you.
0
I had this question after viewing Variable type declaration in VFP.

My goal to to query a value in a remote computer's registry from within my VFP 8 program.
The only API functions I could find was  OpenRemoteBaseKey (.NET Framework) and RegConnectRegistry  (Advapi32.dll)

The C++ construction:
LONG WINAPI RegConnectRegistry(
  _In_opt_ LPCTSTR lpMachineName,
  _In_     HKEY    hKey,
  _Out_    PHKEY   phkResult
);

lpMachineName is a string variable like "\\remotecomputer"
hKey can be one of these hex constants (the hex value is shown with a &H prefix):
    HKEY_LOCAL_MACHINE,  &H80000002
    HKEY_USERS , &H80000003
phkResult is described as: A pointer to a variable that receives a key handle identifying the predefined handle on the remote computer.

In VFP I tried this:
  DECLARE INTEGER RegConnectRegistry IN win32api ;
    STRING lpMachineName, ;
    INTEGER hKey, ;
    INTEGER phkResult

  ln_result=0
  ln_HKEY_USERS = 0x80000003
  ln_Ret = RegConnectRegistry("\\EPCWIN10", ln_HKEY_USERS, @ln_result)

ln_Ret returns 1780, according to Winerror.h that means: "A null reference pointer was passed to the stub"

The remote registry service is running on \\EPCWIN10
I'm thinking I can't simply convert hex to decimal.
What am I doing wrong? Is there some other way to programmatically read a value from a remote registry?
Thanks,
Jerry
0
Hi Experts

Could you point a way to equalize the spaces beteween the combo texts due graphical character dimensions?

Accordingly to
img001
Making the "(nnn)" as possible more vertical aligned.

Thanks in advance
0
Keep up with what's happening at Experts Exchange!
LVL 11
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hello,
in this forum i found the below quoted post which exactly describes my problem. However the soulution given does not help in my case.
In a Foxpro9 installation under W10pro64 I need the DayView.ocx which i copied to System32 and Syswow64.
On one system the manual regsvr32 procedure works on another it does not.
Thanks for help and here the old question:

"In a command prompt I am running this line:  

C:\Windows\System32> regsvr32 C:\Windows\System32\ImageViewer2.OCX

I get the following error:

RegSvr32
The Module "C:\Windows\System32\ImageViewer2.OCX" failed to load.
Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.  
The Specified module could not be found.  

This is a new 64 bit, Win7 laptop.  The OCX file has been transferred from a 64 bit Win 7 system it succesfully installed on.  I am logged in as Administrator and running cmd as Administrator.  I have a VFP app that relies on this OCX to run. "
0
VFP9 Expert----I know this is replied most of time. but this is little different. I have created a form with a container. During run time,  I need to add n number of command buttons in container by searching number of records (n)  in a cursor/table. After populating buttons, it should adjust the size within container. On clicking each button, it should show me record from cursor/table as a messagebox. I m developing software for a hotel. Imagine there is a dashboard type form on screen where the command button shows the room name and on clicking it I shall make either checkin or checkout the guest (this I can do it).
Since the number of rooms may vary it should be added during run time when I add rooms in a cursor or table.
Actually I have already done it by counter nos of command buttons needed, but every time I need to add programatically for any changes  in number of rooms.
0
I have a web service pushing vfp data (oledb dataset) from server A to an asp.net app's gridview on server B.
The date fields showing up in the grid are ALL the previous date. For example, the raw data is 11/20/2017, yet the gridview will show 11/19/2017. I also tried with the asp.net app installed on a completely different server, on a different network. I get the same results.  
However, if I call the web service from server A to my asp.net dev PC, I get the proper dates showing up.
I've tried coding the webservice using both ODBC and oledb and the results are the same. Any ideas?
0
What is the best way to detect whether or not a VFP9 grid has the focus?

I want to be able to open a form containing several grids, each showing its column headers and one row of data, then expand a grid when it gets focus and shrink it back to its original size when it loses focus.
0
Hello,

For testing the performance of a legacy database application (.DBF files) I need to temporarily disabe SMB2 and 3 on WS 2008 R2 and WS 2016 (standard editions) and turn off opportunistic locking (Oplocks.)

I have researched it a but can’t seem to get it to work – links to some related articles below.

On the servers I think I just need to disable SMB2 since MS states SMB3 is automatically disabled when SMB2 is because they share the same stack.

What I’ve found is that the following procedure done on the server should work but it does not seem to.

1.      Reboot

2.      Show SMB1 running:
C:\ >sc query mrxsmb10
SERVICE_NAME: mrxsmb10
TYPE               : 2  FILE_SYSTEM_DRIVER
STATE              : 4  RUNNING
                        (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0

3.      Show SMB2 running
C:\ >sc query mrxsmb20
SERVICE_NAME: mrxsmb20
TYPE               : 2  FILE_SYSTEM_DRIVER
STATE              : 4  RUNNING
                         (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0

4.      Update the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Registry entry: SMB2
REG_DWORD: 0 = Disabled

5.      Reboot

6.      Show that SMB2 is still running
C:\ >sc query mrxsmb20
SERVICE_NAME: …
0
Hello Experts,
Our customer has several applications, a few of them developed more than 20 years ago in visual basic and visual fox
they work just fine so the customer is not interested in migrating although we are pushing him to do so... and probably soon
he will in invest in these...
for the time being we are still using a four applications developed 3 in vb6 and 1 in vfp
everything has been working ok until last weekend taht we upgraded to win 10
the older app seem not to be updating when working in the network as usually
and we are experiencing some corruption in the fox indexes...

Is there any parameter in win 10 that we can use to help this...
the customer may take this a a way to push him to invest right now
and that is not the idea.... the customer has to do it in his own time and understanding..

So i would really love to find a solution for this.

Best regards,
0
I would like to send SMS from vfp9 programe.
I have knowledge of vfp6
I don't know how.pl. guide me.
0
I have a Visual FoxPro program that is generating a pivot table.  When I open the generated file, the pivot table is displayed with the subtotals first followed by the detail, as desired.  However, when I click on any of the expand/collapse buttons next to a subtotal heading, the pivot table changes to show the subtotals after the detail.  I read that the table must be in 'Outline' layout form in order to show the subtotals before the detail, so that has been done.  

Here's the code that sets the LayoutForm and LayoutSubtotalLocation values:

FOR EACH oFld IN oPivotTable.PivotFields
      oFld.LayoutForm = xlOutline
      IF oFld.Name <> "Data"
            oFld.LayoutSubtotalLocation = 1
      ENDIF
NEXT

This happens in both Excel 2007 and Excel 2016.  

Is there some other setting that I've missed that will keep it from reverting when the expand/collapse buttons are clicked?
0
I have an issue with something that has worked many times before, but not so much now.  I have a large database of uses of plants by native peoples of north america, 44,691 uses.  (Database is online at naeb.brit.org if you'd like to see what it's like}  It's native form is FoxPro.  I got a request from some college kids in Oregon who want to do a virtual tour of useful trees on their college campus. I said I'd help.  I got a list of all the tree species in the county in Oregon where the college is.  113 species.  I put their names (latin binomials) in a small database, named MarionORTrees.dbf.  The main listing of all the plants is titled bothitem.dbf Here's the list of commands I used. Sciname is the names of the species in Marion County.  Synthname is the latin names of all the species in the database.

CLEAR
SELECT a
USE "d:\data files\databases\synth99\MarionORTrees.DBF"
SELECT b
USE "d:\data files\databases\food\bothitem.DBF"
SET ORDER TO SYNTHNAME   && SYNTHNAME
SELECT a
SET RELATION TO sciname INTO b
SET SKIP TO b
BROWSE FIELDS a.sciname,b.synthname,b.comname,b.tribe,b.use,b.descrip
BROWSE LAST FOR b.synthname#"  "

The last command should show all the relevant info for the items in the main database for trees in Marion County.  But it doesn't. I have various outcomes, some really loony, none really right.

I'm using what I believe to be the latest version of Windows 10 Pro: Build 15063

Any suggestions?
0
Free Tool: SSL Checker
LVL 11
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi Experts

Could you point how to have a gateway to credit cards/ paypal/ ... - any library for that use when using a VPF's PDV app?

Thanks in advance!
0
I have a DOCX with mail merge fields set up and a CSV file for the data source. If I complete the merge and save the main document, when I re-open the main document I get an error message saying that (an unknown docx filename) is a mailmerge main document. Word cannot find it's data source (correct CSV filename).
The CSV file stated in the error message exists in the path stated in the error message. I know that if running manually, I can disconnect then reconnect the data source and go on, however, this document needs to be processed from within a Visual Foxpro program using OLE automation. Unfortunately, if I attempt to process the document from within the program I get the same message about Word cannot find the data source.
I need to get this working as soon as possible using Word 2010 and Office 365. Worthy of mention is that I have many Visual Foxpro programs that successfully automated Word mail merge when we were using Word 2003.
Thanks in advance.
Cathie
NYC
0
Is there a way to make a VFP application executable that runs fine in Windows 7 with Visual Studio 6 installed to work in Windows 10? Windows 10 does not allow to install VS 6. Windows 7 complained somewhat during the VS 6 installation, but still installed it, and the VFP executable runs fine.

Thank you.
0
i have a program running 15 yrs now and the client wants to use Excel to link to the dbc and tables to do some more reports
0
Hello Experts!

So I'm working on converting some programs over from Inserting data into FoxPro to now inserting that same data into MS Access 2013...because lets face it FoxPro is gone.

Now comes my issue, in FoxPro I had a field set to character length of 4...in MS Access same field text set to length of 4.
However there are times I get data in the file that is longer than 4 and when importing that data into FoxPro it would just truncate the data from say 6 to 4 and insert it...however in MS Access it doesn't strip it from 6 to 4 it throws an error.

"The field is too small to accept the amount of data you attempted to add."

Is there a way to set MS Access (property of some kind) that will just truncate (ignore the length) the data if it is longer than 4?
Or do I need to change my program to pull all fields from left to right and truncate all the fields in my program?

Thanks,
Mark
0
I have Foxpro 2.6 dos run under Novell 3.12 server. I want to move it to windows server 2012r2. What I have to do to make it work multiple users?
0

FoxPro

Visual FoxPro (VFP), and its predecessor FoxPro, is a data-centric, object-oriented, procedural, database programming language and IDE from Microsoft last released in 2007 that still has some active use due to its low cost of deployment and fairly rapid development. In 2008, Microsoft released a set of add-ons for VFP's xBase components to allow interoperability with various Microsoft technologies. It allows data processing against its native file-based data tables or database servers such as SQL Server.

Top Experts In
FoxPro
<
Monthly
>