Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Tables from DBC
Message
From
27/11/1998 08:07:29
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
27/11/1998 07:59:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00161758
Message ID:
00161929
Views:
17
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
Map
View

Click here to load this message in the networking platform