dbf

C# Read from .DBF files into a datatable

喜欢而已 提交于 2019-11-29 02:27:09
I need to connect to a .dbf file in visual Studio using C# and populate a data table. Any ideas? I can currently view the tables in Visual Fox Pro 9.0 Code I have tried and failed, keep getting External table is not in the expected format. private OleDbConnection conn; private OleDbCommand cmd; private OleDbDataReader dr; private string sqlStr = ""; private DataSet myDataSet; private OleDbDataAdapter myAdapter; void test2() { conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\PC1\Documents\\Visual FoxPro Projects\\;Extended Properties=DBASE IV;"); conn.Open();

How to read/write dBase III files using C#/.NET ODBC or OLE?

时光怂恿深爱的人放手 提交于 2019-11-29 02:09:18
I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction? Thanks for your time. Something like ... ? ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=e:\My Documents\dBase;Extended Properties=dBase III" Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(ConnectionString ) dBaseConnection.Open() From: http://bytes.com/forum/thread112085.html Dejan Janjušević I realize this is an old thread,

How to create a DBF file from scratch in C#?

三世轮回 提交于 2019-11-29 02:08:20
I am trying to write a DBF file from scratch in my program. I want to create it, add some columns, and then add data to the columns X amount of times. My program will not need to read it in again, but other programs will. I've looked around for a solution to this, but all seem to assume an existing DBF file, whereas I want to make a new one. The purpose of this is to make the DBF part of an ESRI ShapeFile. Does anyone know how to do this? Download Microsoft OLE DB Provider for Visual FoxPro 9.0 and use: string connectionString = @"Provider=VFPOLEDB.1;Data Source=D:\temp"; using

达梦数据库的表空间管理

大憨熊 提交于 2019-11-28 23:32:23
达梦数据库的表空间管理 前面达梦数据库的安装是在centos服务器完成并记录的。后续的数据库相关操作将在本机的达梦数据库来操作方便。 表空间有分用户表空间、系统表空间(SYSTEM)、回滚表空间(ROLL)、临时文件表空间(TEMP)和数据库默认的表空间(MAIN)等等,我们这次的操作主要就对正常使用的用户表空间增加、删除、修改。 1、查看所有表空间 以下几个是达梦数据库默认有哪些表空间: 1.SYSTEM:系统表空间,存放数据字典信息和全局的系统数据 2.ROLL:回滚表空间,存放了数据库运行过程中产生的回滚记录 3.TEMP:临时表空间,存放临时数据,临时表默认都存放在临时表空间上 4.MAIN:数据库默认的表空间,创建数据对象时,如果不指定存储位置,默认存放到该表空间 select id,name,max_size,total_size from v$tablespace; 2、创建表空间 创建最普通的表空间,初始数据文件大小 create tablespace tbs1 datafile 'tbs1.dbf' size 50; 以下是创建自动扩展的表空间,初始大小50M,最大100M create tablespace tbs2 datafile 'tbs2.dbf' size 50 autoextend on maxsize 100; 以下是创建自动扩展的表空间

What's the easiest way to read a FoxPro DBF file from Python?

五迷三道 提交于 2019-11-28 16:20:58
问题 I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is there a library to open these in Python? I only need to read them, and would preferably have access to the memo fields too. Update : Thanks @cnu, I used Yusdi Santoso's dbf.py and it works nicely. One gotcha: The memo file name extension must be lower case, i.e. .fpt , not .FPT which was how the filename came over from Windows. 回答1: You can try this recipe on Active State. There is also a DBFReader module which you can try.

oracle创建数据库和用户

我与影子孤独终老i 提交于 2019-11-28 11:01:33
  以前开发的时候用得比较多的是mysql和sql server,oracle用的比较少,用起来比较生疏,mysql和sql server用起来比较类似,就oracle的使用方式和他们不同,oracle在创建数据库的时候要对应一个用户,数据库和用户一般一一对应,mysql和sql server 直接通过create databse “数据库名” 就可以直接创建数据库了,而oracle创建一个数据库需要以下 三个步骤 : 创建两个数据库的文件 创建用户与上面创建的文件形成映射关系 给用户添加权限 一、创建两个数据库的文件(monitor.dbf 和monitor_temp.dbf 两个文件) CREATE TABLESPACE monitor LOGGING DATAFILE 'E:\app\owner\oradata\orcl\monitor.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL; create temporary tablespace monitor_temp tempfile 'E:\app\owner\oradata\orcl\monitor_temp.dbf' size 100m autoextend on next 32m maxsize 500m extent

Access Visual FoxPro database from Java

£可爱£侵袭症+ 提交于 2019-11-28 09:30:14
I've been trying to access a Visual Fox Pro database from Java for a week now. I'm getting desperate because my project is in a very tied budget and timeframe. (As any other project, I guess, hahaha) I have a .dbf , a .cdx and a .fpt files. I need to be able to look for a record, extract data, and update data. I don't have a VFP licence. I hope someone has some pointers or a working example that I can use. If the only way is buying a driver I'll be willing to consider it based on suggestions received. This is a short description of what I have tried. I found this xBaseJ: java objects to read

How to create a .dbf file using c#?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 08:19:44
问题 I am trying this to make a select and it works just fine string str = "SELECT * FROM FREE RIGHT JOIN TestTest ON FREE.DOCNO = TestTest.DOCNO"; DataTable dt = new DataTable(); OdbcDataAdapter da = new OdbcDataAdapter(str, odbconn); da.Fill(dt); I am trying this to create a .dbf and i get this OdbcException : string str0 = "Create Table Persons (Name char(50), City char(50), Phone char(20), Zip decimal(5))"; OdbcCommand cmd = new OdbcCommand(str0, odbconn); cmd.ExecuteNonQuery(); ERROR [42000]

Encoding problems with dBase III .dbf files on different machines

别等时光非礼了梦想. 提交于 2019-11-28 07:04:13
问题 I'm using C# and .NET 3.5, trying to import some data from old dbf files using ODBC with Microsoft dBase Driver. The dbf's are in dBase III format and using ibm850 encoding for strings. Now, when I run my program on my machine, all string data read from OdbcDataReader comes out converted to UTF-16 or UTF-8 or something, idk and I save it as UTF-8 and everything is ok, but when I try to use this program on an XP box, some characters aren't converted correctly to UTF-8. 'Õ' for example. There

Convert .csv file into .dbf using Python?

女生的网名这么多〃 提交于 2019-11-28 06:34:50
How can I convert a .csv file into .dbf file using a python script? I found this piece of code online but I'm not certain how reliable it is. Are there any modules out there that have this functionality? You won't find anything on the net that reads a CSV file and writes a DBF file such that you can just invoke it and supply 2 file-paths. For each DBF field you need to specify the type, size, and (if relevant) number of decimal places. Some questions: What software is going to consume the output DBF file? There is no such thing as "the" (one and only) DBF file format. Do you need dBase III ?