DanEvansJr
Programmer
I'm in a bit of a bind. Not major, but a bind nonetheless. I'm trying to populate a table with data about OTHER tables. The table name and record count. I'd like to do this with a quick and dirty function without having to open the actual tables. Here is the code:
* Get a snapshot of the data\backup folder for all of the import files. Throw them all into an array called _rollerback
store adir(_rollerback,(_pathdata)+'backups\wprotimp-*.dbf') to _count
* Create a temporary table to show the user all of these files.
create table (_pathlocal+"rollback_file.dbf"
(file_name c(100),rec_count c(15))
for x = 1 to _count
insert into rollback_file (file_name,rec_count) values(alltrim(_rollerback(x,1)),'# records')
endfor
Unfortunately, reccount('tablename') only works for tables that are in an open work area. Since the number of tables in my array can get quite large, I don't want to have to open and close that many tables on the fly.
Does anyone have any ideas??
* Get a snapshot of the data\backup folder for all of the import files. Throw them all into an array called _rollerback
store adir(_rollerback,(_pathdata)+'backups\wprotimp-*.dbf') to _count
* Create a temporary table to show the user all of these files.
create table (_pathlocal+"rollback_file.dbf"
for x = 1 to _count
insert into rollback_file (file_name,rec_count) values(alltrim(_rollerback(x,1)),'# records')
endfor
Unfortunately, reccount('tablename') only works for tables that are in an open work area. Since the number of tables in my array can get quite large, I don't want to have to open and close that many tables on the fly.
Does anyone have any ideas??