Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: M. Akram Bhatti
  Where is M. Akram Bhatti?
 Riyadh
 Saudi Arabia
 M. Akram Bhatti
 To: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: RE: convert txt
Thread ID: 205708 Message ID: 205715 # Views: 36 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Sunday, November 30, 2008 2:30:38 PM         
   


> ok,
> if i create many tables with same fields(columns),and delimter type?
>
> how i can
> append many of text files to those tables, via same code
>
> thanks again
>
> >
> > How the data in text files is stored, I mean delimter type?
> >
> > You should have same number of fields as columns in the text file and the fields/column order too. You can try the following command:
> >
> >
USE T1
> > APPEND FROM t1.txt TYPE DELIMITED

> >
> > Regards,
> > akram

CLOSE TABLES
DIMENSION la_tables(5)
la_tables[1] = "t1"
la_tables[2] = "t2"
la_tables[3] = "t3"
la_tables[4] = "t35"
la_tables[5] = "t58"

FOR ln_CntrTbl = 1 TO ALEN(la_tables)
  lc_table = la_tables[ln_CntrTbl]
  USE (lc_table) EXCLUSIVE
  ZAP
  lc_txtfile = la_tables[ln_CntrTbl] + ".txt"
  APPEND FROM (lc_txtfile) TYPE DELIMITED
  USE IN (lc_table)  
ENDFOR


Regards,
akram



COMPLETE THREAD
convert txt Posted by mohammed qasem @ 11/30/2008 1:14:03 PM
RE: convert txt Posted by M. Akram Bhatti @ 11/30/2008 1:29:58 PM
RE: convert txt Posted by mohammed qasem @ 11/30/2008 1:56:13 PM
RE: convert txt Posted by M. Akram Bhatti @ 11/30/2008 2:30:38 PM
RE: convert txt Posted by mohammed qasem @ 12/1/2008 9:11:26 AM