Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: lavesh patel
  Where is lavesh patel?
 ocala
 Florida - United States
 lavesh patel
 Tags
Subject: RE: create cursor
Thread ID: 330961 Message ID: 331029 # Views: 38 # Ratings: 0
Version: Visual FoxPro 9 Category: VFP and .NET
Date: Monday, December 26, 2011 2:47:59 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


Activate Event of a Page Tab, IMHO, is not a good place to create a cursor because every time this page gets activated, it will wipe out the previous contents (records). Move your create cursor into form's load event.

http://sandstorm36.blogspot.com
http://weblogs.foxite.com/sandstorm36/default.aspx

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