Reading text files as a table

TomBascom

Curmudgeon
Like this?

Code:
define temp-table ttName no-undo
  field someThing01 as character
  field someThing02 as character
  field someThing03 as character
.

input from value( "textFile.dat" ).
repeat on endkey undo, leave:
  create ttName.
  import ttName.
end.
input close.

for each ttName no-lock:
  display ttName.
end.

/* create textFile.dat like so:
1 2 3
a b c
 */
 

roy999

New Member
Hi Tom,

Thanks for replying to my post, and sorry for hijacking this post. :eek:
This solution would work better for me than the 1 you provided in my post. The only problem is that i dont know how to get Progress to find the file.
How do i do that?
 

TomBascom

Curmudgeon
If you mean that you want Progress to search the path for the file specified in the INPUT FROM statement then you should check out the SEARCH function.
 
Top