General information
Category:
Coding, syntax & commands
John,
Couldn't you have done this?
SELECT (This.Value)
m.TableCount = ADBOBJECTS(aTables,"Table")
ACOPY(aTables,ThisForm.aTableList)
IF m.TableCount > 0
ThisForm.lstTables.RowSourceType = 5
ThisForm.lstTables.RowSource = "ThisForm.aTableList"
ELSE
ThisForm.lstTables.RowSourceType = 0
ThisForm.lstTables.RowSource = ""
ENDIF
Just a thought
Rex
>>>How can I put the table names from a database into an array?
>>>
>>>Thanks
>>
>>John, use ADBOBJECTS() function.
>>
>>Nick
>
>Hi Nick,
>
>Thanks for the info on ADBOBJECTS(), that however will not work in this situation. I ended up with the following in the interactivechange of the list box where I put a list of databases in the directory that was selected. The code seems to work ok.
>
>SELECT ;
> ObjectName ;
> FROM (This.Value) ;
> WHERE ObjectType = "Table" ;
> INTO ARRAY ThisForm.aTableList
>
>SELECT (This.Value)
>USE
>
>IF _Tally > 0
> ThisForm.lstTables.RowSourceType = 5
> ThisForm.lstTables.RowSource = "ThisForm.aTableList"
>ELSE
> ThisForm.lstTables.RowSourceType = 0
> ThisForm.lstTables.RowSource = ""
>ENDIF
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only