Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select doesn't produce an array
Message
 
To
30/10/2008 16:31:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01358484
Message ID:
01358501
Views:
28
>Given the below:
>
>dbc2Convert = "\\tpdfiles\data\dfreeman\tip\data\rta\rta.dbc"
>aTables = GetDBCTableNames(dbc2Convert)
>for i = 1 to alen(aTables)
>? aTables(i)
>next
>
>**************************************************************************
>function GetDBCTableNames()
>lparameters myDBC
>select objectname as tablename ;
>from (myDBC) ;
>where objecttype = "Table" ;
>into array A1
>return A1
>
>Why do I get an error that says A1 is not an array? The select produces 6 records.
>
>Thanks
Why not with
DIMENSION laArray[1]
dbc2Convert = "dbc2Convert = "\\tpdfiles\data\dfreeman\tip\data\rta\rta.dbc"
lnTables = GetDBCTableNames(dbc2Convert)
for i = 1 to lnTables
   ? laArray(i)
next


**************************************************************************
function GetDBCTableNames(myDBC)
select objectname as tablename ;
       from (myDBC) ;
where objecttype = "Table" ;
into array laArray
return _TALLY
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Reply
Map
View

Click here to load this message in the networking platform