473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Text files content handling in Access 2003

1
I want to extract some information in a text file that is not tab, comma and space separated. The format of the text file is actually unknown.
The problem now is, i want to extract like three lines from each section of the text file content, break the lines into different part and use the broken info to populate an already created table in ms access ( all these should be carried out at a press of a cmd button using VBA code in access or VB code)

uploadRemoteInventory started at 2006/09/21 <Intel_dub>
USER LABEL : Intel_dub/r01sr1/board#01
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#02
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Date (00) : 03/03/07
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#03
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL030803249
Date (00) : 03/03/13
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#04
unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
NG INFORMATION
Serial number : CL031100082
Date (00) : 03/03/19
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#05
unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL031402599
Date (00) : 03/04/07
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#06
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL031100199
Date (00) : 03/03/20
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#07
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL030803614
Date (00) : 03/03/19
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#08
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL031100300
Date (00) : 03/03/22
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#09
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL031100330
Date (00) : 03/03/22
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#10
Unit type : CONGI
Unit part number : 3AL78830AAAH04
Software part number : --------------
Serial number : CL031391468
Date (00) : 03/03/13
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#11
Unit type : SERVICE
Unit part number : 3AL78817AAAF02
Software part number : --------------
Serial number : FA031157589
Date (00) : 03/03/11
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#12
Unit type : CONGI
Unit part number : 3AL78830AAAH04
Software part number : --------------
Serial number : CL031391697
Date (00) : 03/03/14
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#13
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL031100299
Date (00) : 03/03/22
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#14
Unit type : A21E1
Unit part number : 3AL78832AAAF02
Software part number : --------------
Serial number : CL050500668
Date (00) : 05/03/04
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#15
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL031100279
Date (00) : 03/03/22
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#22
Unit type : EQUICO
Unit part number : 3AL78836AAAM02
Software part number : --------------
Serial number : CL030607199
Date (00) : 03/03/06
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#23
Unit type : MATRIXN
Unit part number : 3AL78848BAAH01
Software part number : --------------
Serial number : FA031060552
Date (00) : 03/03/07
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#24
Unit type : P63E1
Unit part number : 3AL79092AAAE02
Software part number : --------------
Serial number : CL030810111
Date (00) : 03/02/21
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#25
Unit type : S-4.1N
Unit part number : 3AL78856BBAB01
Software part number : --------------
Serial number : FA030859487
Date (00) : 03/02/26
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#26
Unit type : S-4.1N
Unit part number : 3AL78856BBAC01
Software part number : --------------
Serial number : FA031157458
Date (00) : 03/03/12
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#27
Unit type : P63E1
Unit part number : 3AL79092AAAE02
Software part number : --------------
Serial number : CL012963743
Date (00) : 02/08/22
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#30
Unit type : P63E1
Unit part number : 3AL79092AAAE02
Software part number : --------------
Serial number : CL014243762
Date (00) : 02/08/22
OPERATOR INVENTORY DATA
----------------------------------------------

Using the information above, i want to create a table in access that will contain 10 or above columns. these colunm are;

1. User Label colunm will contain this info: INTER_LAG_PTO i.e the first set of characters after the ":" and before the first "/" sign
2. ADM Type: Name of the Mahine (to be determined using code)
3. Unit Type: A21E1 (Used to determine name of the machine)
4. Site Name: Name of the site (this will be populated from anoda table called Sites)
5. Rack: r01 (another set of string after the first "/")
6.SubRack: sr01 (another set after the r01)
7.Slot Number: sl22 (another set after the sr01)
8.Port Number: daughter#01(another set after the last"/")
9.Release
10.ANV Part Number: 3AL78848BAAH01

Note, not all the columns will contain information at this time.

This is what i want to achieve in access 2000. Each section (i.e all the contents before the long dashes (-----------------------------------------) sign should be on a row in the table created. This will be done for all the sections in all the txt files.

I hope this is clear enough for now. Pls can anybody help me achieve this.
Thank you.
Oct 11 '06 #1
1 1659
[quote=Jamad]I want to extract some information in a text file that is not tab, comma and space separated.

Do you need help reading the text file?
Is the format of the file always like this?

USER LABEL : Intel_dub/r01sr1/board#02
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Date (00) : 03/03/07
OPERATOR INVENTORY DATA
----------------------------------------------

USER LABEL : Intel_dub/r01sr1/board#03
Unit type : A21E1
Unit part number : 3AL78832AAAE02
Software part number : --------------
Serial number : CL030803249
Date (00) : 03/03/13
OPERATOR INVENTORY DATA
----------------------------------------------
Oct 11 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jean-Marie Delapierre | last post by:
Hi, I have two files in a directory. one called toto.txt with the following content : 1 2 3 4 5
13
by: TC | last post by:
Folks Is there >>ANY<< way to get the actual text of an error that is trapped by the Form_Error event? I mean actual text like: "duplicate record in table XYZ", not template text like:...
2
by: BT Openworld | last post by:
I have just had to upgrade to Access 2003 as Access 97 EMail (SendObject) doesn't work when loaded on Windows XP. I'm finding my way around Access 2003 but my biggest problem is getting...
2
by: Todd_M | last post by:
I was wondering what anyone might suggest as "best practice" patterns for streaming out fixed formatted text files with C#? Let's say we get our data in a dataset table and we need to iterate over...
8
by: lightcap | last post by:
Server Windows 2003. Created one web site, everything works fine. Copied the content to another folder and created another web site pointing to the copied contecnt for test purposes. Configuration...
2
by: neeraja.ram | last post by:
Hello All, I am just learning XML. I need your help in converting a text file to XML. The text file is not a delimited one for me to do the things easily. for eg. a sample file could be...
1
by: Wandering | last post by:
I know you guys are heavy duty coders, while I do ad-hoc analysis, and rarely write code. And, I may be in the wrong groups because this is about an install issue, and I don't think it's a code...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
16
by: Wayne | last post by:
I've read that one method of repairing a misbehaving database is to save all database objects as text and then rebuild them from the text files. I've used the following code posted by Lyle...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.