Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adatabase command question
Message
From
01/10/2005 08:47:38
 
 
To
01/10/2005 08:36:58
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01055216
Message ID:
01055225
Views:
9
>
>OPEN DATABASE S:\praktyk\data2005.dbc
>SET DATABASE TO DATA2005
>
>nTel1	= ADATABASES(laGroep1)
>
>?lagroep1(1,1)    && gives data2005
>
>CLOSE DATABASES
>
>nTel1	= ADATABASES(laGroep1)
>
>?lagroep1(1,1)    && give data2005
>
>
>Sorry, i forgot to place the extra command adatabases with transporting the question to this forum
>it still gives the same result, even when i rerun the adatabases command

Viv hit the nail, I think. The array is nor redimensioned if there are no open databases. Try
OPEN DATABASE S:\rap\data2005.dbc
SET DATABASE TO DATA2005

nTel1  = ADATABASES(laGroep1)

?lagroep1(1,1)    && gives data2005

CLOSE DATABASES 

Release lagroep1
Dimension lagroep1(1)
nTel1  = ADATABASES(laGroep1)     

?lagroep1(1,1)
I agree that this behavior is scary, and may lead to unexpected/wrong results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform