Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 To: lavesh patel
  Where is lavesh patel?
 ocala
 Florida - United States
 lavesh patel
 Tags
Subject: RE: create cursor
Thread ID: 330961 Message ID: 330983 # Views: 45 # Ratings: 0
Version: Visual FoxPro 9 Category: VFP and .NET
Date: Sunday, December 25, 2011 11:15:25 AM         
   


> hi!
> i create page frame with 2 pages first custo info and second one cashpaid invoice
>
> 2nd page have 4 field
>
> id,name ,descri,capaid_amt and addbutton(add record)
>
> below of this i want to create grid which show data for this id i set grid prop recordsoure from cursor and record source type =alias
>
> i did below code in page active
>
> create cursor cdata (name c(25), descri c(20), capaid_amt n(8,0))
>
> and in page i drope grid i set prorecotype = alias and recordsource=cdata
>
> and add button click event i use below code
>
> SELECT name , descri, capaid_amt;
> FROM dailydatabse!cashpaid;
> WHERE cashpaid.shivid=this.Parent.TxtShivid.value;
> into cursor cdata
> this.parent.grid.refresh
>
> but it didnot show any record in grid
> please help me
> thanks

Not sure I'd use this.Parent. in a query but try this.

SELECT name , descri, capaid_amt; 
  FROM dailydatabse!cashpaid;
 WHERE cashpaid.shivid=this.Parent.TxtShivid.value;
  INTO CURSOR tempCursor

SELECT cdata
SET SAFETY OFF
ZAP
SET SAFETY ON
APPEND FROM DBF('tempCursor')
USE IN tempCursor
GO TOP IN cdata
This.Parent.Grid.Refresh()

HTH.

ENTIRE THREAD

create cursor Posted by lavesh patel @ 12/25/2011 12:42:40 AM
RE: create cursor Posted by tushar @ 12/25/2011 5:39:43 AM
RE: create cursor Posted by Russell Hill @ 12/25/2011 11:15:25 AM
RE: create cursor Posted by Jun Tangunan @ 12/26/2011 2:47:59 AM
RE: create cursor Posted by lavesh patel @ 12/26/2011 1:49:43 PM