dbf

Optimal way to handle .dbf from C#

What data-provider can I use to update .dbf file from C#? I tried a few different .dbf providers to create a DataSource but I get a message like this: "Error Message: ERROR HYC00 Microsoft ODBC dBase Driver Optional feature not implemented." Or when I generated a dataset and a dataadapter with an update function I got: "Update requires...

Which header format can be assumed by reading an initial .DBF byte?

Regarding the first byte of a .DBF file and how to detect the version of xbase used (ie, the format of the rest of the file), the most comprehensive list I can compile is: Byte 0 ----------- x xxx x 001 = 0x?1 not used 0 000 0 010 = 0x02 FoxBASE 0 000 0 011 = 0x03 FoxBASE+/dBASE III PLUS, no memo x xxx x 100 = 0x?4 dBASE 7 0 000 0 101 ...

Numeric field width in DBF file inconsistent when created with oleDB (.NET)

OleDB always add one more digit to DBF numeric fields when we create them. A command like this: CREATE TABLE [file1.DBF] ( [MY_FIELD] NUMERIC(1,0) NULL) will create a field that can contains 2 digits (or one digit and a minus sign). What's funny is that I can ask for a length of zero like this NUMERIC(0,0) and it's going to create a fiel...

Create .DBF in C# code that is readable from Excel (VFP or not)

LANGUAGE: C#, System: Windows7, Excel 2007 I want to create a .DBF from some data, and i want to open it from Excel 2007. It can be either dBase or foxpro. I am currently doing in FoxPro9 (btw this code is from the internet): OleDbConnection con = new OleDbConnection("Provider=VFPOLEDB.1;Data Source=C:\\Temp\\;"); con.Open...

How to manipulate .dbf files using c#?

I am trying to something like this: string pathFiles = Path.Combine(Application.StartupPath, "DB"); string strconn = "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;" + "Dbq="+pathFiles+";"; OdbcConnection odbconn = new OdbcConnection(strconn); odbconn.Open(); ...

How to create a .dbf file using c#?

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...

How to use identity on a column in .dbf ?

Hi I am using this code to create a .dbf file and it works fine ( i use OdbcConnection ) string TblInventory = "Create Table Inventory (Id int , Date datetime, CreatedBy char(100))"; OdbcCommand cmd = new OdbcCommand(TblInventory, odbconn); cmd.ExecuteNonQuery(); Insert works well: "Insert Into Inventory (Id, Date , Creat...

How to use transaction on a .DBF file using Odbc?

Hi I have a problem here using .dbf files. I can make CRUD operations but i get an exception when i try to use transactions. I am doing like this: public void AddRolesToUser(string user, string[] roles) { using (OdbcConnection connection = new OdbcConnection(ConnectionString)) { OdbcCommand command = ...

Use lock when more users can write to a .dbf database file?

Sadly, i have to deal with a .dbf file or database if you want, in the server side and i have one question. Since the .dbf is on the server side more users can access it(read and write, i use C# and OdbcConnection). Should i use lock whenever i make insert/update? I will answer to my own question because i want to paste a piece of cod...

How to read and write dbf in a native way?

In Delphi for Win32, how to read and write a dbf file in a native way, without the BDE? I know there are some components available in the web, but I have never used any of them, so I don't know wich to choose (if any). ...

Generating dBase II DBF File in C# 3.5

Hi, I'm generating dbf file to get imported to legacy systems that only accepts dBase II OR III. My aplication is .Net 3.5. I initially started working with this component VFPOLEDB.1 but it only generate dbf files in dBase V format which isn't backwards compatibily. Anyone knows a component or driver to generate de dbf file in dBase I...

Encoding problems with dBase III .dbf files on different machines

Hello. 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 a...

Python - Convert CSV to DBF

Hello, I would like to convert a csv file to dbf using python (for use in geocoding which is why I need the dbf file) - I can easily do this in stat/transfer or other similar programs but I would like to do as part of my script rather than having to go to an outside program. There appears to be a lot of help questions/answers for conver...

How to read from a DBF file on a 64bit OS using Delphi?

Using Delphi, now that the Microsoft Jet Driver is no longer supported on 64bit operating systems, what would be the best way to read from a DBF/DBase file? ...

How to create dBASE .mdx index file from java

I have a project where the result files are dBASE formatted database files. I need to generate them from java. Although there are quite some solutions to write the .dbf files, I also need a way to write the associated .mdx index files. What's the best way to do this? (I've tried xBaseJ but it looks like it has some issues generating...

how to write to a dbf file in asp.net?

I want to create a .dbf file. Can anyone help me out how to do that using c#.net ...