Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Eric Puah
  Where is Eric Puah?
 
 Malaysia
 Eric Puah
Subject: RE: set cursor to grid record source
Thread ID: 185210 Message ID: 185473 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Wednesday, July 23, 2008 6:56:38 PM         
   



> Below is my coading, but it show error message (c:\<my project>\sales.dbf does not exit)what i do worng
>
> CREATE CURSOR sales (slsno c(10), loc c(10), stcode c(20), barcode c(20), colour c(6), size c(6), desc1 c(50) ,;
> desc2 c(50), desc3 c(50), qty n(16,2), price n(16,2), disper n(16,2), disamt n(16,2), amount n(16,2))
>
>
> thisform.pageframe1.page1.grid1.RecordSource = sales

When you assign it programmatically, you would need quotes:
thisform.pageframe1.page1.grid1.RecordSource = sales


On the other hand, missing quotes would cause a "Variable not found" error.
So my guess is that you created the cursor in another datasession, for instance in another method before you do the "Do Form" command?

FWIW, when you want to avoid the "grid reconstruction" that Tushar mentioned, you can probably use a "Parameterized Local View" instead of assigning a temp cursor at runtime.


hth
-Stefan

ENTIRE THREAD

set cursor to grid record source Posted by Eric Puah @ 7/22/2008 8:01:05 PM
RE: set cursor to grid record source Posted by tushar @ 7/22/2008 8:15:31 PM
RE: set cursor to grid record source Posted by Eric Puah @ 7/23/2008 6:47:25 PM
RE: set cursor to grid record source Posted by Stefan Wuebbe @ 7/23/2008 6:56:38 PM