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

Hello everyone,

I have a parameter view (lv_prname) that I am passing a name string on a VFP form.  The view is tied to a grid resource in a grid.  The view is using a "Like" sql statement.  When I pass a name value (example "TOM J", the view is not returning all the records that I have in the table.  I know I have 25 records in the table that should match, but it returns on 19 records.

My code that I am running

with thisform
do case

....
....
	case .a = 2 && processed record by name
		c = alltrim(.t1.value)
		lc_name = ALLTRIM((c)+'%')
		.Grid1.recordsource = 'lv_prcname'
		requery('lv_prcname')
		.Grid1.refresh()
		.parm2 = lc_name
		b = reccount('lv_prcname')
		.hqp = lc_name
		if b = 0
			messagebox('No Records Found',0,'Record Not Found Message')
			.cmdquit.setfocus()
			.cmdok.visible = .f.
			.refresh()
		else
			.cmdok.visible = .t.
		endif	

Open in new window



My local query view has following

SELECT * FROM payroll!payroll_tbl WHERE Payroll_tbl.fname LIKE ?lc_name ORDER BY Payroll_tbl.fname

DBSetProp(ThisView,"View","Comment","processed rec view for like names"+CHR(13))
DBSetProp(ThisView,"View","SendUpdates",.F.)
DBSetProp(ThisView,"View","BatchUpdateCount",1)
DBSetProp(ThisView,"View","CompareMemo",.T.)
DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
DBSetProp(ThisView,"View","FetchMemo",.T.)
DBSetProp(ThisView,"View","FetchSize",100)
DBSetProp(ThisView,"View","MaxRecords",-1)
DBSetProp(ThisView,"View","Prepared",.F.)

Open in new window

0
OWASP: Avoiding Hacker Tricks
LVL 12
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

I've got a FORM that is being used as a progress message window, to report stages in a lengthy piece of processing.
When the processing has finished, I click on the [x] close button. This calls the .QueryUnload() method, which asks a "do you want to close?" question.
If the answer is "Yes", then it calls THISFORM.Release().
But this doesn't close the FORM!
What am I doing wrong here?
0
I have an application using MSXML to retrieve data from a web site. On Successful receipt I 'PUT' an XML document to the web site confirming this and the data is cleared from the web site.

Subsequent retrievals then exclude documents previously downloaded.

However within the same application data session I am getting replicated downloads even though all objects related to the download are released after successful download and recreated each time a download process is started.

When I close and restart the application the correct data position is returned.
0
I have created a serie of executable files that each generate a specific report on the server.(Visual Foxpro 9).

I need to enable the user , but doing something (send an email., copy a file to a folder, do anything that will trigger that executable file.
I can not give him access to the server. and there are many executables.. (around 20)

I was thinking of creating a watchdog on a folder... but don't know how to do this in Visual Foxpro
0
Microsoft have created a Printer Class described here

It gives the invocation syntax for C#, C++, F# and VB

Anyone know how to invoke it in VFP?
0
Hey guys,
I have a client who use a Visual FoxPro based program.  The program is contained in a shared folder that is shared from a server that all the users access.  This is everything that has happened with it:

The client recently migrated from SBS 2011 to a Server 2016 DC that was also doing file and print sharing. The program was then being hosted from the 2016 server.

The users reported all kinds of performance issues after going back and forth with the vendor I finally just spun up a Windows 7 VM and migrated the program (shared folder) to that.  I was told that though it was not working as well as it was before, it ran much better.

Now I have two Windows 10 users both of which are getting an "invalid seek offset," error.  The vendor told me that the error message means that there was a network drop and even what you research online says the same thing, however one user switched back to Windows 7 and never reported the error after that.  Also this same user who is now having this issue had Windows 7 before and was setup in the same cubicle as before. Also I ran utility called, "Ping for life," which a 100% ping success rate, which means no networking issues.

Right now I want to check with you guys, if there are any known issues with Visual Foxpro and the newer operating systems.  Any articles that say anything about this?
0
try
            {
                var cdxExpressions = new List<CDXExpression> {
                new CDXExpression { expression = "ENTRY_DATE", name = "cdx_p1"},
                new CDXExpression { expression = "LOSS_PD", name = "cdx_p2"}
            };

                string strCon =
                    @"Provider =vfpoledb;Data Source=C:\DBF_files_Folder\20180921\" + tableName + ".DBF"; // TestDataBase1.DBF";
                OleDbConnection con = new OleDbConnection(strCon);
                OleDbCommand cmd = con.CreateCommand();
                con.Open();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "ExecScript";

                var myCode = "use " + tableName + " exclusive\n" +
                      string.Join("\n", cdxExpressions.Select(e => $"index on {e.expression} tag {e.name}")) +
                      "\nuse";

                cmd.Parameters.AddWithValue("code", myCode);
                cmd.ExecuteNonQuery();
                con.Close();
            }
            catch (Exception ex)
            {

            }
C# -

Code above used VFPOLEDB driver. This driver should be installed on machine explicitly.
When I put my WPF application on common drive and ask users to access it, they also got to install VPFOLEDB. Is there a other than installing this MSI on all client machines.
Tried using JET OLEDB. It gives an error saying 'Cannot execute a Select Query'.

try
            {
  …
0
Our Desktop systems are written in VFP-9, and from time to time we have users reporting errors due to loss of connection to MSSQL (usually when the system is idle for a few minutes - a coffee break, for example). Until Windows 7, this problem no longer occurred by unchecking IPV6 and turning off the power-saving feature of the network card.

With Windows 10, we found that there are other places with the power saving feature such as monitor and HD. We have already cleared all this, but some users still report the same error (loss of connection).

Is there any way to avoid this loss of connection?

Translate from portuguese:

Os nossos sistemas Desktop são escritos em VFP-9 e, de uns tempos para cá, temos usuários reportando erros por perda de conexão com o MSSQL ( normalmente quando o sistema fica inativo por alguns minutos – uma pausa para o café, por exemplo ). Até o Windows 7, esse problema deixava de ocorrer desmarcando o IPV6 e desativando o recurso de economia de energia da placa de rede.

Com o Windows 10, descobrimos que existem outros lugares com o recurso de economia de energia, como monitor e HD. Já desmarcamos tudo isso, mas alguns usuários ainda reportam o mesmo erro ( perda de conexão ).

Tem alguma forma de evitar essa perda de conexão ?
0
I have this csv file which i want to convert into foxpro table.

The first row is a header, The second row is details.

Will like some advice on how to go about it.20180807_144846.csv

Thank you in advance.

Erick Nyange
0
I need to link an access database to what i think is a visual foxpro table the data is from an accounting program in foxpro
which is called Pegasus Opera version 2

I have managed to convert the table into a csv format then into MS ACCESS  but I could do with a live link if possible

Many Thanks


Andy2_SNAME.DBF
0
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

descendex.zipdescendex.zip0
down vote
favorite
I am having a problem with seeks not working on descending indexes key values.

I set up my DBE as follows:

SET COLLATION TO AMERICAN Dbeload( "ADSDBE", .F. ) DbeSetDefault( "ADSDBE" )

// FOXCDX compatibility - .CDX/.FPT DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE, ADSDBE_CDX ) DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE, ADSDBE_CDX )

// Use server rights not user rights DbeInfo( COMPONENT_DATA, ADSDBE_RIGHTS_MODE, ADSDBE_IGNORERIGHTS )

I am connecting through an ADS data dictionary and the tables were added using the FoxPro (DBF/CDX) driver (not the Visual Foxpro driver.)

The indexes are created through ADS.

I have an index that puts empty dates first followed by descending dates then ascending IDs as:

 descend(If(empty(date),’99999999’,dtos(date))+id
Whenever I do a seek as either dbseek(descend(‘99999999’)) or dbseek(descend(dtos(dMyDate))) the seek goes to EOF or the proper record (date does exist) is not found properly.

I have the character set set to ANSI for both systems and the collation to Engl.(Amer) in both.

I've attached a sample program, table and other information in case anyone wants to take a look.
0
I have been coding Fox Pro for years as needed to perform what ever quant studies that I need to do which draw of a database.

I know I need to learn a new language for the future as FoxPro is really long gone.

What would you all suggest?  I need something that does all that FOX does and more I would hope.  A language that will be good for the next 20 years and is supported.

Thank You

Dan
0
I need to convert an application created in MS-DOS FoxPro2.6 to any new language programming keeping same features

or create a new one using its same ideas for the features

please anyone interested let me know
email  jorge.roggiero@gmail.com
0
I have a VisualFoxPro (VFP) application being ported to a sqlserver backend.  The app has a memo field that contains more than 10,000 characters in come cases.  Using a varChar(max) causes a problem, the VFP view retrieves the data but there is an extra space between every character, doesn't really edit well, and will not update back to the server.  Is there a workaround or solution?
0
Date picker in FoxPro only fires on change event not click event if value chosen is the same as present value

( Microsoft date and time picker control 6.0 (SP4) )

if the user chose a date in the date picker then moves to a new record and chooses that same date, nothing is returned. Click event seems to not work, only onchange (actually change event on this control)  event which is not very functional.

Thanks :)
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
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  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 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
>