dbf

What is the best opensource dbf driver for java? [closed]

大兔子大兔子 提交于 2019-11-28 05:28:45
Can anybody please mention the best available opensource odbc:jdbc driver to read / write dbf.? I have a dbf file which I would like to query (select/update) via a web application (Tomcat app). Any help/tips would be appreciative. Thank you. try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String connString="jdbc:odbc:Driver={Microsoft dBASE Driver (*.dbf)};DefaultDir=E:\\db";//DeafultDir indicates the location of the db Connection connection=DriverManager.getConnection(connString); String sql="SELECT * FROM table_name where condition";// usual sql query Statement stmt=connection

Trying to Import FoxPro DBF File to SQL Server

佐手、 提交于 2019-11-28 02:06:50
问题 As the title says, I'm trying to import a FoxPro dbf file into sql server using openrowset. At first I tried to export the DBF to an xls file and import using the Import/Export wizard. This works pretty well normally, but there is one field that sometimes holds a really long string, and this string is being truncated at 4096 characters during the export from the dbf to xls. I found an old post with instructions on how to do this using openrowset. When I try the first answer: select * from

Reading DBF files with pyodbc

只谈情不闲聊 提交于 2019-11-28 01:35:01
问题 In a project, I need to extract data from a Visual FoxPro database, which is stored in dbf files, y have a data directory with 539 files I need to take into account, each file represents a database table, so I've been doing some testing and my code goes like this: import pyodbc connection = pyodbc.connect("Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=P:\\Data;Exclusive=No;Collate=Machine;NULL=No;DELETED=Yes") tables = connection.cursor().tables() for _ in tables: print _

C# Read from .DBF files into a datatable

ぃ、小莉子 提交于 2019-11-27 16:46:59
问题 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

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

谁说胖子不能爱 提交于 2019-11-27 16:32:17
问题 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. 回答1: 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 )

怎么删除表空间对应的某一个数据文件

核能气质少年 提交于 2019-11-27 05:35:19
如果想要删除表空间的数据文件,最好且最安全的办法是,删除表空间后重建 步骤如下:   1,导出该表空间中的所有内容;   2,删除表空间:DROP TABLESPACE <tablespace_name> INCLUDING CONTENTS;   3,重新创建新的表空间及其数据文件;   4,将导出的数据导入表空间; 但是在实际应用环境中,数据文件往往比较大,表空间重建显得不太实际。 目标:删除表空间的一个数据文件 测试环境:Oracle 11.2.0.4.0 64bit 注意:此方法仅用来删除误加的表空间数据文件,如果该数据文件中已有数据,删除会导致表空间数据的不完整,建议使用上述方法删除。 首先, ALTER DATABASE DATAFILE '***.DBF' OFFLINE DROP ,这个命令用来将该数据文件从逻辑上删除,此时该文件的online_status为 recover 状态 SQL> SELECT file_id, file_name, status, online_status FROM Dba_Data_Files; FILE_ID FILE_NAME STATUS ONLINE_STATUS ---------- ----------------------------------------------------------------------

Access Visual FoxPro database from Java

不想你离开。 提交于 2019-11-27 02:57:54
问题 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

How to import a DBF file in SQL Server

折月煮酒 提交于 2019-11-27 01:28:56
How can you import a foxpro DBF file in SQL Server? Use a linked server or use openrowset, example SELECT * into SomeTable FROM OPENROWSET('MSDASQL', 'Driver=Microsoft Visual FoxPro Driver; SourceDB=\\SomeServer\SomePath\; SourceType=DBF', 'SELECT * FROM SomeDBF') I was able to use the answer from jnovation but since there was something wrong with my fields, I simply selected specific fields instead of all, like: select * into CERTDATA from openrowset('VFPOLEDB','C:\SomePath\CERTDATA.DBF';''; '','SELECT ACTUAL, CERTID, FROM CERTDATA') Very exciting to finally have a workable answer thanks to

What is the best opensource dbf driver for java? [closed]

梦想的初衷 提交于 2019-11-27 01:01:58
问题 Can anybody please mention the best available opensource odbc:jdbc driver to read / write dbf.? I have a dbf file which I would like to query (select/update) via a web application (Tomcat app). Any help/tips would be appreciative. Thank you. 回答1: try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String connString="jdbc:odbc:Driver={Microsoft dBASE Driver (*.dbf)};DefaultDir=E:\\db";//DeafultDir indicates the location of the db Connection connection=DriverManager.getConnection(connString);

geotools修改shapefile 属性名乱码问题

微笑、不失礼 提交于 2019-11-26 15:43:06
在GeoServer中文社区的讨论地址为:http://opengeo.cn/bbs/read.php?tid=1701&page=e&#a 使用geotools修改shapefile之后, 发现dbf文件内容中, 属性名都成了乱码, 但属性值就不是乱码。修改之前还没有乱码的。 而且在代码中也已经通过以下方式设置过编码方式了: ShapefileDataStore shape = new ShapefileDataStore(url);shape.setStringCharset(Charset.forName("GBK")); 我的修改代码如下: /** * 修改shapefile. * @param dataStore * @param fidStr 要修改的数据对应的featureID * @return */ public static boolean updateShapeFile(ShapefileDataStore dataStore,String fidStr) { DefaultTransaction transaction = null; SimpleFeatureStore store = null; try { dataStore.setStringCharset(Charset.forName("GBK")); String[] featureNames