如何导入文本文件以访问并为表分配值? [英] How to import text file to access and assign value to table?
问题描述
我有一个文本文件,我想阅读并将部件分配给MS Access表中的某个字段
当您查看此文件时,您将看到带有相应信息的数字Ex :120A。 CMPBLLBK我想要120A被叫?位置?和?CMPBLLBK?填充在那个位置。
基本上当它被读入访问时,我想要一个表格
,其中包含名为[TSR Number] [Type Action]的字段[服务类型] [网络要求]等
任何帮助将不胜感激。
TcossDocument2有我将阅读的格式
TcossDocument是一个实际文件
I have a text file that I want to read and assign parts to a certain field in MS Access table
When you look at this file you will see numbers with corresponding info Ex: 120A. CMPBLLBK I want to have 120A be called ?Location? and ?CMPBLLBK? be populated in that location.
Basically when it is read into access I want a table that
that has fields named [TSR Number] [Type Action][TYPE OF SERVICE][NETWORK REQUIREMENTS],etc
Any help would be appreciated.
TcossDocument2 has the format in which I will be reading
TcossDocument is an actual document
推荐答案
这将打开一个文件,把它读成文本字符串。然后你可以从那里操作字符串来得到你需要的东西。
This will open a file and read it into a textstring. You can then manipulate the string from there to get what you need.
谢谢你的快速响应 - 您能否展示或指导我如何编写第一行来创建表方面。之后我可以关注
基本上当它被读入访问时,我想要一个表格
,其中包含名为[TSR Number] [Type Action]的字段[服务类型] [网络要求]和来自该字段中文本的相应信息,即在阅读文本[TSR号码]之后将具有EJ13JAN102064。填充在其中
Thank You for your quick response-Can you show or guide me how I would write the first line to create the table aspect. I can follow after that
Basically when it is read into access I want a table that
that has fields named [TSR Number] [Type Action][TYPE OF SERVICE][NETWORK REQUIREMENTS] and the corresponding information from the text in that field i.e. After reading the text [TSR Number] would have "EJ13JAN102064" populated in it
您是否需要基于每个文件创建表?如果表已经存在会发生什么?追加或覆盖?
Do you need to create the tables on a per file basis? What should happen if the table allready exists? Append or overwrite?
这篇关于如何导入文本文件以访问并为表分配值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!