Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 To: Benny Thomas
  Where is Benny Thomas?
 Jeddah
 Saudi Arabia
 Benny Thomas
 Tags
Subject: RE: Bernard New CA Tutorial
Thread ID: 207921 Message ID: 209346 # Views: 4 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Saturday, December 27, 2008 3:46:28 PM         
   


> Hi Samir,
>
> > > As suggested by you I added the code in caCustomer class, then ran the form but it did not show any records.
> >
>
> >
> > That mean no error appeared?
>
> No error appeared and NO data as well.
>
> >
> > I want a favour from you. Could you zip the 2 class and the form and post them.
>
> Attached is the class and form.
>
> Benny
>
>
>
> https://www.foxite.com/uploads/16d23308-949c-4764-a082-db02f63af6f8.rar

Benny

Then you have not read the tutorial and followed it properly.

In Step #12 I say:

Finally make sure the lNoDataOnLoad property = .T.......

lNoDataOnLoad = .T.
selectcmd = "select * from customers"


NoDataOnLoad meand that you want No Data On Load!

That means that the CA will internally not load any data and bring back just an empty cursor.

That is the whole purpose of the Textbox.

Now run your form, and in the textbox type this ALFKI and press the Get Data button. Now what do you see?
Do you not see the record for customerid = "ALFKI"?

By the way I downloaded your form and only changed the DE.Tag property to point to my tables and it worked flawlessly.

You guys should really read and understand the tutorial before giving up so easily. The whole idea is to understand not just quickly skip thru everything. Getting the data is not the main thing but understanding what and how it is being done - that is the key.

Also I distinctly told Samir to put the DODEFAULT with Parameters in the caCustomer class. Yet in your class I downloaded, you, like Samir, have put DODEFAULT with parameters in the caBaseClass. Why not just follow exactly what is in the tutorial or what I tell you to do? Adding that code in the base class DOES NOTHING.

In your class open the caBaseClass and remove those DODEFAULT commands.

Open the caCustomer class and in the CURSORFILL and AFTERCURSORFILL events add them as I said. Adding it to the BEFORECURSORFILL is NOT needed as the code you added when building the class is in the BeforeCursorFill so you don't need to add anything there, since the BeforeCursorFill will fire as soon as you call CursorFill. That is how events happen. Once added you can double click on the left of that line to add a breakpoint and then use F8 to step thru the code.

Don't forget to type "ALFKI" first before clicking the Get Data button or you will get nothing.


Bernard

** If you see someone without a smile, give em one of yours :) **
My Blog 8-)

ENTIRE THREAD

Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/16/2008 5:48:39 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/17/2008 1:19:32 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/17/2008 9:58:17 AM
RE: Bernard New CA Tutorial Posted by Olaf Doschke @ 12/17/2008 11:13:03 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/18/2008 11:42:15 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/20/2008 11:36:39 AM
RE: Bernard New CA Tutorial Posted by Olaf Doschke @ 12/20/2008 4:57:07 PM
RE: Bernard New CA Tutorial Posted by mike castillo @ 12/17/2008 6:37:04 AM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/17/2008 8:24:09 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/17/2008 8:44:56 AM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/17/2008 10:13:27 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/17/2008 11:37:33 AM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/18/2008 1:03:25 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/18/2008 7:18:21 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/17/2008 4:04:16 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/18/2008 1:41:38 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/18/2008 11:07:33 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/18/2008 11:22:01 AM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/18/2008 10:35:08 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/19/2008 12:58:58 AM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/20/2008 8:42:36 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/20/2008 11:41:19 AM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/20/2008 3:24:12 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/21/2008 8:08:23 PM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/22/2008 4:20:13 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/23/2008 12:29:14 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/27/2008 3:46:28 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/27/2008 7:01:42 PM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/28/2008 6:49:03 PM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/28/2008 1:28:06 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/21/2008 6:02:22 AM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/19/2008 3:03:36 AM
RE: Bernard New CA Tutorial Posted by Mike Yearwood @ 12/19/2008 4:06:01 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/21/2008 6:14:24 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/20/2008 11:43:57 AM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/21/2008 6:10:28 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/21/2008 12:16:35 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/22/2008 3:58:52 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/22/2008 1:54:03 PM
RE: Bernard New CA Tutorial Posted by Mike Yearwood @ 12/22/2008 4:22:56 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/22/2008 9:50:31 PM
RE: Bernard New CA Tutorial Posted by Olaf Doschke @ 12/22/2008 11:46:57 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/23/2008 10:33:40 AM
RE: Bernard New CA Tutorial Posted by Mike Yearwood @ 12/23/2008 3:03:19 PM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/23/2008 3:44:50 PM
RE: Bernard New CA Tutorial Posted by Olaf Doschke @ 1/4/2009 5:36:49 PM
RE: Bernard New CA Tutorial Posted by Mike Yearwood @ 12/23/2008 2:59:27 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/23/2008 5:30:16 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/23/2008 10:26:32 AM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/23/2008 11:29:09 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/23/2008 12:05:15 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/24/2008 2:24:57 AM
RE: Bernard New CA Tutorial Posted by Benny Thomas @ 12/22/2008 4:24:34 PM
RE: Bernard New CA Tutorial Posted by Bernard Bout @ 12/23/2008 5:29:27 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/18/2008 7:09:59 PM
RE: Bernard New CA Tutorial Posted by mike castillo @ 12/17/2008 11:10:00 AM
RE: Bernard New CA Tutorial Posted by Samir Ibrahim @ 12/17/2008 11:43:42 AM