Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Afields alias not found
Message
From
12/11/2007 12:29:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01268530
Message ID:
01268533
Views:
12
>I am running the following code:
>
>
>	FOR i= 1 to ThisForm.List1.ListCount
>		if thisform.List1.Selected(i)
>			local array aTemp(1)
>			a = ALLTRIM(thisform.list1.List(i))
>			tbl = ALLTRIM(.sour+(a))
>			use (tbl)
>			AFIELDS(aTemp,tbl)
>			RELEASE aTemp
>		endif
>	endfor
>
>
>I am getting "alias is not found" when using "AFIELDS(aTemp,tbl)". I do have my database opened.
>
>the variable "a" contains
>"PAYROLL_TBL.DBF"
>
>
>the variable tbl contains
>"C:\PROGRAMMING\PROGRAMS\VFP8\PAYROLL\PAYROLL_TBL.DBF"
>
>
>I issued a alias() command and it shows
>"PAYROLL_TBL.DBF"
>
>
>I issued a dbc() command and it shows my database in use
>
>"C:\PROGRAMMING\PROGRAMS\VFP8\PAYROLL\PAYROLL.DBC"
>
>
>What am I doing wrong here?

Hi Nick,

variable tbl should only be the table alias, or the workarea, not the full path name of the table.
help says:
  AFIELDS( ArrayName [, nWorkArea | cTableAlias ] )
HTH,
Beth
Previous
Reply
Map
View

Click here to load this message in the networking platform