Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I think this forum rocks it has saved my bacon many many times..."

Geography

Where in the world do Tek-Tips members come from?
paul102384 (Programmer)
5 Oct 07 11:01
hi to all pb programmers,

i want to import a text file(tab delimited) to the datawindow
whereas in a text file, for every line, the first character should be letter D or H,
and then, D should be imported to 1st datawindow or dw_1 while H will go to another datawindow which is dw_2...   

e.g.
H    1001            0    4894.04000
D    1002            0    4895.04000
H    1003            0    4896.04000

my codes looks like this:

docpath = w_glimport.sle_1.Text
i_open = FileOpen(docpath, LineMode!)//
i_read = FileRead(i_open, s_input)//
s_im = mid(s_input,1,1)//
IF s_im = 'H' THEN//
import = dw_1.ImportFile(Text!,docpath)//
END IF

- the problem is the import variable returns -2 which means empty file and no records or data can imported..

can someone give me the codes to fix this problem..

tnx...

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close