Using "Import Text" Access feature in C#

  • Thread starter Thread starter VMI
  • Start date Start date
V

VMI

In Access, when a user's going to import a fixed-width format ascii file, a
window in the "Import Text Wizard" lets the user "mark" where in a string
one field will begin and end (with the vertical lines that can be moved with
the mouse). Can this (or something similar) be implemented in order for the
user to graphically choose which part of the string will be, for example, be
displayed in a MessageBox?
So for example, my control would display the string "Hello World" and the
user can add add and then move a vertical line through the control and place
it after the second "l". When an button click is raised, the messagebox will
display "Hell".

Thanks.
 
My application is a windows applications. would javascript still work? also,
since the site is so full of information, where can I start looking for
something like this?

Thanks.
 
Sorry, didn't realize you were doing a windows application. I can't think of
a real good way to do this off hand. One way would be to display the data in
a box. Then have the user move to the position they want and enter some
special identifier like [*]. Then use string.indexOf("[*]") to find the
delimiter. The trick here is they could modify the text. If this is a
concern, then once you find the position of the delimiter, note the position
and delete the delimiter. Then compare the original text with the 'new'
text. If they are different, yell at the user.

Another idea (probably better) would be to put data in a readonly box. Then
have arrows pointing left and right to allow them to move the delimiter. If
you do this, be nice to the user and have 2 left and 2 right arrows. The
second arrow is a 'fast' [forward || reverse] which moves it 10 or so
characters at a time.

Good luck with this, let me know what you end up doing.
 
Back
Top