Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: bryan wetton
  Where is bryan wetton?
 Morphett Vale
 Australia
 bryan wetton
 Tags
Subject: Use command problem
Thread ID: 210093 Message ID: 210093 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Saturday, January 03, 2009 8:48:15 AM         
   


In my application I create a large table from a number of other related tables and save it to a folder in My Documents.

The table name is SQL copied from TEMP_1 as COMTAGLIST preceeded by a prefix being the projectname of the subject project with the other tables.

I want to offer the ability to add to some of the table fields with another run through a prg table scan/endscan where more options have been chosen. This needs the selected table name to be TEMP_1

My problem is that I need to select a particular COMTAGLIST table where the user may have a number for different projects.
As I know the full file name I can test for it and then open it and do a scan again adding to some of the fields.

BUT the use appears to open the table but a browse shows no records even though numrecords gives the correct numbers.

- here is the routine code .


PARAMETERS mydbffile
	
		logging('Creating new List')	
		
		mytable=Juststem(mydbffile)

		Select 0

		Use (mytable) In 0 Alias 'TEMP_1'

		Select TEMP_1

		numrecords = Reccount() - shows 7384 records in this case
		

		logging('Open table '+mytable+ ' as ' +Alias() +  ' Records to be scanned  -:  '+ Transform(numrecords ))

(this shows as '6:13:45 PM  Open table MY NEW PROJECT_1_COMTAGLIST as TEMP_1 Records to be scanned  -:  7854')

&&  carry on on existing table - bryan



Using the View command TEMP_1 is shown as the current table but the browse window shows empty fields in a single record.

Can anyone help me out with this?

-Bryan



COMPLETE THREAD
Use command problem Posted by bryan wetton @ 1/3/2009 8:48:15 AM
RE: Use command problem Posted by Stefan Wuebbe @ 1/3/2009 10:48:49 AM