visual-foxpro

How do i read a dbase file and apply different decoding?

烂漫一生 提交于 2019-12-12 12:25:40
问题 I have a dbf file endcoded as 866 codepage (DOS) Using the code below, I'm trying to read it. Problem is that strings I get are formed as if the file was in code page 1252. I've checked other questions on SO and other forums with no luck so far. Looking for ideas on hot to read it propperly. var ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PathtoFile\;Extended Properties=""dBase 5.0"""; var dBaseConnection = new System.Data.OleDb.OleDbConnection(ConnectionString );

How to see the controlsource and the display source properties?

白昼怎懂夜的黑 提交于 2019-12-12 04:18:07
问题 I have two tables, user and company, and I have a combo box in which I list all the companies I have in the company table. My question is, how to use databinding in foxpro to display the company name? When I save the information to the database, I only need to save the company ID; same for display, from the company ID I have in my user table, I would like to display the company name. I tried using the properties : CmbCompany.controlesource = myTable.companyID cmbCompany.displaysource =

VFP: How can I access the contents of an Outlook attachment

喜欢而已 提交于 2019-12-12 02:52:17
问题 I have a program that reads and send emails using Outlook automation, from Visual FoxPro. I have functions to retrieve and save attachments, but I would like to read the contents of an attachment to a string without saving the file to disk. In the example below, I instantiate Outlook, pick up a namespace and a reference to the current user's inbox. I then pick up a reference to an arbitrary message (number 32 in the inbox), and a reference to the message's attachment. oOutlook = createobject(

Speed up this Find/Filter Operation - (VB6, TextFile, ADO, VFP 6.0 Database)

南笙酒味 提交于 2019-12-12 01:28:53
问题 I'm trying to figure out how to speed up this operation. Before I import a record from the text file I first need to see if one exists in the database. If it does exist I'm going to perform an update operation on it. If it does not exist I'm going to create a new record. Running the code you see below this operation takes somewhere in the neighborhood of 3 hours. I've tried using ADO's find method and it actually appears to be slower than the filter method. The database is a Visual Foxpro 6

How about .Net project needs to build under both x64 and x86?

那年仲夏 提交于 2019-12-11 20:17:28
问题 My small application does 2 things seem conflict: 1) Use VFPOLEDB.1 to talk to Visual Foxpro database to get some data --> It require app builder in x86 or 'Any CPU' 2) However there is another function to call a powershell script to access IIS of the server and it requires project build in x64. (or when .Net launch powershell, it gets confused about which version and will throw some COM object class not register error) How can I handle this conflict issue? 回答1: I'm not entirely sure, but

File 'phd.prg' does not exists

笑着哭i 提交于 2019-12-11 12:19:11
问题 I have a visual fox pro 9 database, and i am trying to connect it from my desktop application. i can get data from almost all tables except one table. when i run query to select data from "test.dbf" it throws exception saying File 'phd.prg' does not exists i am using VFP OLEDB drivers to connect with database. DataTable YourResultSet = new DataTable(); OleDbConnection yourConnectionHandler = new OleDbConnection( "Provider=VFPOLEDB.1;Data Source=E:/TRACKONE.DBC;Exclusive=false;Nulls=false;");

Batch convert visual foxpro dbf tables to csv

不打扰是莪最后的温柔 提交于 2019-12-11 03:49:03
问题 I have a huge collection of visual foxpro dbf files that I would like to convert to csv. (If you like, you can download some of the data here. Click on the 2011 link for Transaction Data, and prepare to wait a long time...) I can open each table with DBF View Plus (an awesome freeware utility), but exporting them to csv takes a few hours per file, and I have several dozen files to work with. Is there a program like DBF View plus that will allow me to set up a batch of dbf-to-csv conversions

Visual Fox Pro and Python

浪子不回头ぞ 提交于 2019-12-10 21:45:39
问题 I'm working with a visual fox pro database (.dbf file) and I'm using the dbf python module. Heres an example: myDb = VfpTable('table.dbf'); Now I can exclude deleted items with this by doing the following: myDb._use_deleted = None; My question(s) is/are is there an easier way to do this? Maybe a function? I hate accessing "private" variables. Also, without setting this property, how can I determine if a row has been deleted? They are still technically in the database so is there a flag? A

SQL - Return limited number of rows, but full row count

。_饼干妹妹 提交于 2019-12-10 16:47:34
问题 Scenario: I need to pull information out of a Visual FoxPro database; however, running large queries against this has a tendency to lock the system up. To resolve this, we put limits in place that cancelled the query if it ran past a certain amount of time, and limited the number of rows it would return. Is there a way to have a query with "SELECT TOP ###", but also return the actual number of rows found through the statement? Or is the only way to run the query twice? (reason being we can

How to delete record from dbf file using python dbf module?

我是研究僧i 提交于 2019-12-08 09:12:24
问题 I'm trying to write/delete records in a visual foxpro 6 dbf file, using python 2.7 and the dbf package: import dbf tbl = dbf.Table('test.dbf') tbl.open() rec = tbl[0] print(rec.__class__) rec.delete_record() Result: <class 'dbf.ver_2.Record'> Traceback (most recent call last): File "C:/Python/Projects/test/test.py", line 11, in <module> rec.delete_record() File "C:\Python\Projects\test\venv\lib\site-packages\dbf\ver_2.py", line 2503, in __getattr__ raise FieldMissingError(name) dbf.ver_2