Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALIAS in a Grid
Message
From
15/12/2001 12:47:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/12/2001 12:35:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00594799
Message ID:
00594819
Views:
46
This message has been marked as a message which has helped to the initial question of the thread.
>That's about what I'm doing.
>The only thing I build my SQl statment in my source code
>
>ex.
>
>Initialy :
>SELECT * from MEMBER into cursor tmpMemebre
>Thisform.myGrid.RecordSourceType = 1
>Thisform.myGrid.RecordSource = 'tmpMemebre'
>
>Later :
>SELECT * from MEMBER M WHEER M.MemDate < DATE() into cursor tmpMemebre
>Thisform.myGrid.RecordSourceType = 1
>Thisform.myGrid.RecordSource = 'tmpMemebre'
>Thisform.myGrid.Refresh
>
>The grid never gets the control back, it just freezes
>I also tried, removing my Grig object and adding it back on the fly, same thing.
>
>
>
>Haroutunian Antranik
>Yerevan, Armenia
>ADANA SOLUTIONS INC.
*Grid.init
with this
 .RecordsourceType= 3
 .Recordsource = ;
"SELECT * from MEMBER mbr "+;
"WHERE Mbr.MemDate between thisform.StartDate and thisform.EndDate "+;
"into cursor tmpMemebre"
endwith
With a setting like this you could have dynamic recordsource. Have your StartDate and EndDate custom form properties initially set to {} and {^9999/12/31}. You could change Start and End dates on the fly and call :
thisform.myGrid.Refresh
Sometimes it wouldn't work and you'd get a blank grid (ie:MemDate is not indexed source table). Then try the alternative :
thisform.myGrid.RecordSource = thisform.myGrid.RecordSource

PS: Never use 'm' as an alias identifier. It's reserved for MemoryVariable.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform