>I'm using a form to try to import a text file into an existing table without using a wizard. I can locate the file paths but cannot figure
>out how to merge text document into the table. The text file I'm using contains more data than I want to import.
>
>Q: how do I import a text file into that table and set positions so the correct data goes into specific columns?
Create a table that matches the structure of the data coming in, assigning foedls of the correct type and width for what you're reading, filling gaps with dummy fields (dummy1, dummy2, etc.) APPEND into the temporary table. Take the actual data table and append in the records from the temp table; fields will be matched on name, not size or position.
ie:
text file:
AAAAAABBBBB.BBCCCDDDDD
Live table: Afld C(10), Bfld Y, Dfld C(5)
CREATE CURSOR temp (afld C(6), Bfld N(8,2),dummy1 C(3), Dfld C(5)
APPEND FROM txtfile.txt TYPE SDF
SELECT 0
USE LiveTable
APPEND FROM (DBF('temp'))