Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table or Cursor
Message
 
To
23/03/2009 11:26:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01390685
Message ID:
01390794
Views:
80
>Hi All
>
>Suppose I have this situation
>
>
>use (_samples+'data\customer') in 0 Shared Alias Table1
>Create Cursor Table2 (p_name c(20))
>
>? IsTable("table1") && Return .T.
>? IsTable("table2") && Return .F.
>
>Procedure IsTable(tcTableName)
>    *** What is the function?
>Endpr
>
>
>What is the best way of telling that Table1 is "TABLE" and Table2 is "CURSOR"


It's not a solution, but I always name my cursors c_something, like:

select * from mytable where field1='test' into cursor c_mytablefield1test

or create cursor c_something (field1 I, field2 C(50))

That way it is extremely easy to see what's a temporary cursor and what's a real table in my code.

Given my naming convention, I could write a IsCursor function that returns left(alias(),2)="c_"
Brandon Harker
Sebae Data Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform