连接 Textfile http://www.javawolf.com/dbcon/text.htm
2007-06-29 14:44
555 查看
ODBC |
Standard Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:/txtFilesFolder/;Extensions=asc,csv,tab,txt; |
OLE DB |
Delimited columns Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:/txtFilesFolder/;Extended Properties="text;HDR=Yes;FMT=Delimited"; |
(HDR 表示有无标题行,详细的配置信息在Schema.ini文件中设置 注意引号在不同语言中需要转义,如xml中为" 原文解释: "HDR=Yes;" indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite. To specify each columns length use the Schema.ini file. See description below. Important note! The quota " in the string needs to be escaped using your language specific escape syntax. c#, c++ /" VB6, VBScript "" xml (web.config etc) & quot; or maybe use a single quota '. |
Schema.ini |
Schema.ini [customers.txt] Format=TabDelimited ColNameHeader=Truev MaxScanRows=0 CharacterSet=ANSI [orders.txt] Format=Delimited(;) ColNameHeader=True MaxScanRows=0 CharacterSet=ANSI [invoices.txt] Format=FixedLength ColNameHeader=False Col1=FieldName1 Integer Width 15 Col2=FieldName2 Date Width 15 Col3=FieldName3 Char Width 40 Col4=FieldName4 Float Width 20 CharacterSet=ANSI |
(schema.ini文件一般和text文件放在同一级目录下,并且文件名必须为schema.ini 原文解释: The schema information file tells the driver about the format of the text files. The file is always located in the same folder as the text files and must be named schema.ini. |
相关文章推荐
- Socket网络通讯开发总结之:Java 与 C进行Socket通讯【转】from http://www.linuxidc.com/Linux/2012-06/63173.htm
- struts2 java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
- java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd问题终结原因
- 测试网络连接速度 http://www.phoenixtv.com.cn/home/fhkp/testspeed.htm
- 用 NASM 编写代码(转自http://www.codingnow.com/text/nasm.htm)
- java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-valid
- java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
- 恐怖的MySql-bin.0000X日志文件(转http://www.jiucool.com/terror-mysql-bin-0000x-log-file/)
- Yale CAS最佳实践 --全部 (转http://www.javaeye.com/wiki/SSO/535-Yale%20CAS最佳实践%20--全部)
- http://www.regexlab.com/zh/regref.htm
- http://www.tudou.com.mumulu.cn/blankblankblankblankblankblankblankblank.htm
- 如果你的数据库文件只剩下数据文件没有日志文件时,如何附加 (摘自:http://www.cnblogs.com/yukaizhao/archive/2008/07/23/sp_attach_single_file_db.html)
- http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html
- http://www.vantrontech.com/index.htm
- Java 包(package) http://www.runoob.com/java/java-package.html
- Windows Mobile,用C#更改网络连接(SSID、IP Address、Subnet Mask、Gateway)http://www.opennetcf.com/library/sdf/
- http://www.listeningexpress.com/nce.htm
- VC编程规范(转自http://www.zhongguoidc.com/htm_data/69/0608/28000.html)
- cygwin环境建立--http://www.macraigor.com/full_gnu.htm
- java学习路线(本文转自http://www.hollischuang.com/archives/489 )