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

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
Concerto Cloud for Software Providers & ISVs
LVL 5
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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
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 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 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
i have  two  file having  same filed for  diff rant year  and  required  diff of filed no 6 to 17 on 3rd dbf
0
I've got a third-party conversion utility that I want to incorporate into my Visual FoxPro code (version 9.0 SP2).

Two of the parameters that I need to pass to this are non-standard types, which, in the Visual Basic example that comes with the documentation, have been declared as such, with the command

Public Type Coordinates
X As Double
Y As Double
Z As Double
End Type

How do I set this up in VFP?
0
I am trying to automate printing in foxpro.My requirement is When I clicked on print button It should start printing without asking for the destination folder dialogue box. printing is working fine..But it always asks for destination folder dialogue box

i tried with set printer to funtion..But it is for pointing the .exe file of the default printer

set printer on

odoc.printout()

Is there any option in foxpro to set destination folder programatically?

 in my system I have adobe pdf and pdf995.

Thanks in Advance
0
I have a number of old word documents that I need to migrate to pdf but first I need to save them as DOCX but I want to save them without the Encryption password (which I have).

Anybody know how to do this?
0
VFP 9.0SP2 Word 2012

VFP hangs and then fails with with "error code 0x80080005:Server Execution Failed" when executing the line " loWord = CREATEOBJECT("Word.application")"

Worked in Word 2003.

Assistance appreciated

Code:
---------------------------------------------------
 LOCAL loWord, lcName, x, y
LOCAL loRange, loTable
#DEFINE wdCollapseEnd 0

* Start an instance of Word and open a document
loWord = CREATEOBJECT("Word.application")
DOEVENTS FORCE
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
>