visual-foxpro

Force messagebox to foreground

混江龙づ霸主 提交于 2021-01-29 09:22:44
问题 I've got a VBScript that calls a Visual FoxPro Instance and runs a VFP program. Part of this program produces a messagebox. However, if my script is run from the Windows GUI (rather than a Command Prompt), then the message box produced doesn't necessarily come to the foreground. In VBScript I have the following code: Set oVFP = CreateObject("VisualFoxPro.Application") oVFP.DoCmd("Messagebox('Hello World')") Set oVFP = Nothing When I run this script from a DOS prompt, the message box pops to

Operator/operand type mismatch

早过忘川 提交于 2021-01-29 09:14:24
问题 I'm using the Visual FoxPro OLE DB provider to query a VFP DB and I'm getting: System.Data.OleDb.OleDbException 'Operator/operand type mismatch` What could I be doing wrong? 回答1: In my where clause I had an int on one side and a char(15) on the other side Table Schema id int Query SELECT * FROM [some-table] WHERE id = 'some string' 回答2: In my case to avoid such kind of inconveniences I do the following I hope it works for you: var_name = iif(vartype(var_name)=='N',var_name,Val(var_name)) so

Operator/operand type mismatch

淺唱寂寞╮ 提交于 2021-01-29 09:08:46
问题 I'm using the Visual FoxPro OLE DB provider to query a VFP DB and I'm getting: System.Data.OleDb.OleDbException 'Operator/operand type mismatch` What could I be doing wrong? 回答1: In my where clause I had an int on one side and a char(15) on the other side Table Schema id int Query SELECT * FROM [some-table] WHERE id = 'some string' 回答2: In my case to avoid such kind of inconveniences I do the following I hope it works for you: var_name = iif(vartype(var_name)=='N',var_name,Val(var_name)) so

C# VFP OLEDB connection string problems (DBF and CDX vs DBF and IDX)

∥☆過路亽.° 提交于 2020-12-07 19:02:12
问题 I've connected to foxpro databases before, but only ones that have both a .dbf and .idx file. I register the Microsoft Ole DB Provider for Visual Foxpro 7.0 and use the following type of code: string sqlSTR = "SELECT * FROM TableName"; string strConnect = @"Provider=VFPOLEDB.1;Data Source=C:\Stuff.dbf;Extended Properties=dBASE IV;" And open the connection. This file, though, has a .dbf and .cdx file (which, reading online seems to be the structure of the database). When I use the connection

C# VFP OLEDB connection string problems (DBF and CDX vs DBF and IDX)

走远了吗. 提交于 2020-12-07 18:48:25
问题 I've connected to foxpro databases before, but only ones that have both a .dbf and .idx file. I register the Microsoft Ole DB Provider for Visual Foxpro 7.0 and use the following type of code: string sqlSTR = "SELECT * FROM TableName"; string strConnect = @"Provider=VFPOLEDB.1;Data Source=C:\Stuff.dbf;Extended Properties=dBASE IV;" And open the connection. This file, though, has a .dbf and .cdx file (which, reading online seems to be the structure of the database). When I use the connection

Visual Foxpro Query for pending quantity

时间秒杀一切 提交于 2020-02-08 06:44:04
问题 I am having two tables AORDER for Purchase & BORDER for sale. I want to get pending quantity. Sale orders can have more than 1 records against one purchase order. I do not want to show those order having pending quantities 0. I tried this: SELECT ; aorder.orderid,; aorder.orderdate,; aorder.itemname,; aorder.partyname,; aorder.qty as Purchase,; SUM(border.qty) AS Sale,; SUM(aorder.qty-border.qty) as Pending; FROM ; aorder; LEFT JOIN border ; ON aorder.orderid = border.porderid; GROUP BY ;

Visual Foxpro Query for pending quantity

霸气de小男生 提交于 2020-02-08 06:43:27
问题 I am having two tables AORDER for Purchase & BORDER for sale. I want to get pending quantity. Sale orders can have more than 1 records against one purchase order. I do not want to show those order having pending quantities 0. I tried this: SELECT ; aorder.orderid,; aorder.orderdate,; aorder.itemname,; aorder.partyname,; aorder.qty as Purchase,; SUM(border.qty) AS Sale,; SUM(aorder.qty-border.qty) as Pending; FROM ; aorder; LEFT JOIN border ; ON aorder.orderid = border.porderid; GROUP BY ;

VFP networking issues with Windows 10 1803

假如想象 提交于 2020-01-23 03:37:05
问题 We are experiencing some huge issues with multi-user network file sharing on version 1803 of Windows and VFP9 SP2. Here are a few of the issues we see: Blank records written to the database. A system will write a complete record with values in all fields, but the record is blank in the table. Records that are written but don't appear for other users until the table is closed. If session A opens a table and adds 5 records, session B will see that the extra 5 records are there, but they will

Scenario where foxisapi is more suitable than full ASP.NET/C# solution [closed]

大憨熊 提交于 2020-01-17 17:44:37
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 7 days ago . I'm exploring area where my experiences in vfp could contribute more. So my question is : Is there a scenario where Foxisapi solution is more suitable than a pure ASP.NET/C# solutions? Let's exclude the condition that the database use vfp (dbf/dbc). So let's say the database

Getting Error When Using SET PROCEDURE TO

我是研究僧i 提交于 2020-01-15 12:50:30
问题 First let me say that I am very, very new to FoxPro and finding just the basics a bit of a learning curve. I am attempting to create a program file (.prg) that has some public functions that I can call from my main code. I have added the program file " publicfunctions.prg " and included a simple function that returns a hard coded literal (just trying to make the mechanics work) *!* This function is in the publicfunctions.prg file FUNCTION GetFieldValue RETURN 'This is the value' ENDFUNC Then