RE: Stripping out hex codes from text file
- From: "Anand.V.V.N" <AnandVVN@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 23:41:05 -0700
Hi Pete,
This kind of a thing can eb done in Visual Basic. This text file is a comma
seprated file right?
Here is what you do, open the text file, assign the first line to a
variable, usign a combination of mid$(<string>,<star value>,instr$(<the
arguments>)) you can search if the line has hex value, or the other values,
remove them, then add a new record to the access table, open the access table
suing automation and, break the string into different fields and add it to
the database.
Another approcah is that read word by word, again usign the same
mid$(<string>,<star value>,instr$(<the arguments>)) combination and check if
the value is a hex or any other character that you don't want, if they both
match don't add to the table, if they match you can add them to the table.
I suggest access automation using vb becuase if you open it using a data
control or odbc driver, it might not allow the kind of flexiablity that might
be needed.
Hope you found this information useful.
Anand
--
"Who will guard the guards?"
"DubboPete" wrote:
> Hi all,
>
> I have a text file which needs to be imported into a db. The file
> structure unfortunately contains extra characters in the various fields
> that are generated by the ancient program that exports the text file.
>
> is there a way to strip out hex codes, underscores, or ascii characters
> such as alt-0143 (), and so on, just leaving the raw data?
>
> Any help/guidance/pointers to knowledgebase much appreciated.
>
> DubboPete
>
>
.
- References:
- Stripping out hex codes from text file
- From: DubboPete
- Stripping out hex codes from text file
- Prev by Date: value & percentage
- Next by Date: Dynamically return Full Object Reference String
- Previous by thread: Stripping out hex codes from text file
- Next by thread: Disabling Special keys in Acc 2000
- Index(es):
Relevant Pages
|