本文介绍了TEXT字段CSV文件被ADO与Microsoft Text Driver截断为255 C.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello,

使用VBA Excel(W7中的Office 2007),我使用ADO来检索CSV数据文件,同时受益于SQL命令的强大功能。

结构schema.ini中描述了我的CSV文件。

我使用驱动程序{Microsoft Text Driver(* .txt,* .csv)}打开RecordSet并通过CopyFromRecordset将其复制到我的Excel工作表方法。

我开发了schema.ini,VBA和SQL命令...但是有一个非常烦人的缺陷:CSV文件的文本字段被截断为255个字符。这是在打开RecordSet,字段定义为type = 200(adVarChar)和DefinedSize
= 255.

我测试了schema.ini的无效类型TEXT和MEMO LONGCHAR。

抱歉英语不好

Hello,
With VBA Excel (Office 2007 in W7), I use ADO to retrieve CSV data files while benefiting from the power of SQL commands.
The structures of my CSV files are described in schema.ini.
I use the driver {Microsoft Text Driver (* .txt, * .csv)} to open a RecordSet and copy it to my Excel sheet by CopyFromRecordset method.
I developed the schema.ini, VBA and SQL order ... but there is a very annoying flaw: the text fields of the CSV files are truncated to 255 characters. This is after opening the RecordSet that the fields are defined with type = 200 (adVarChar) and DefinedSize = 255.
I tested ineffective types TEXT and MEMO LONGCHAR of schema.ini.
sorry for poor English

推荐答案


  • 你的意思是说你无法取得数据t的长度超过255个字符?
  • 你只得到数据直到255个字符,之后它会被截断。 
  • 你想得到所有的数据而不是只有255个  ;字符对吗?

问候

Deepak 

Deepak 


这篇关于TEXT字段CSV文件被ADO与Microsoft Text Driver截断为255 C.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 18:00