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


Dear Mr. Bernard,

Sorry for the hassle.


> 1. You don't say which tutorial you are talking about. If it is CREATING & USING CA CLASSES – A SIMPLE TUTORIAL PART II then what can I say? You obviously did not follow it correctly. I just did and it worked exactly as in the tutorial.

Since the topic itself is about the 2nd Tutorial (although Samir mentioned Tutorial Part 3) - I did not specifically mention that I am talking about Tutorial Part II. (As for the first tutorial, I do not see any problem now after I followed your last instructions about the same - I am able to make look up cursors from either Native tables or SQL database or MySQL database).

> 2. You don't say whether you are using SQL Server or VFP Native tables

I mentioned that with VFP Native tables everything went on well and no problem here. I had problem with SQL database only. I also mentioned that the Test Connection returned ok - there is nothing like connection in case of native tables, I suppose.

> 3. You use the EVALUATE function wrongly and then say you have an error. Please look up EVALUATE usage in the help file. What do you get when you type:

I was refering to the following line in one of your earlier posts.

ThisForm.DataEnvironment.DataSource = = EVALUATE(oConn1)


VPF help does not say that you have to enclose the variable name in quotes. Following is an example given in help file.

cMathFunc="INT(4.33)"
nResult=EVALUATE(cMathFunc)
?nResult


However,

?EVALUATE("oConn") 


returns a positive number. Confusing as to the usage of quotes : when to use and when not to use.

> How would I know from way over here? How do I know what step you missed or added or changed? Send me a sample please.

I am attaching the class and forms. Sub-class caOrders is for native tables (formnatup) and caOrdersSQL is for sql database (formsqlup). Pls check the code in Load of form Formsqlup - is it necessary? I inserted this code after I got the error mentioned in my earlier post (crsOrders not found). Even after this lines of code, error is the same. My connection string for sql is Driver={SQL Server};server=benny\sqlexpress;database=Northwind. Please change this accordigly. You are reqeusted to kindly go through the classes/forms at your convenience and help me to correct my mistakes.

Regards,

Benny


https://www.foxite.com/uploads/d3c95fce-2857-4837-9528-99b0dc10c7e1.rar

ENTIRE THREAD

Bernard CA New Tutorial Part 3 Posted by Samir Ibrahim @ 12/23/2008 1:18:40 PM
RE: Bernard CA New Tutorial Part 3 Posted by mike castillo @ 12/23/2008 2:14:59 PM
RE: Bernard CA New Tutorial Part 3 Posted by Samir Ibrahim @ 12/23/2008 3:47:39 PM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/24/2008 2:23:22 AM
RE: Bernard CA New Tutorial Part 3 Posted by Benny Thomas @ 12/24/2008 7:44:25 PM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/25/2008 1:09:05 PM
RE: Bernard CA New Tutorial Part 3 Posted by Benny Thomas @ 12/25/2008 6:57:17 PM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/27/2008 6:57:21 AM
RE: Bernard CA New Tutorial Part 3 Posted by vivek deodhar @ 12/27/2008 5:58:12 AM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/27/2008 7:04:00 AM
RE: Bernard CA New Tutorial Part 3 Posted by Mike Yearwood @ 12/27/2008 4:06:01 PM
RE: Bernard CA New Tutorial Part 3 Posted by vivek deodhar @ 12/29/2008 5:42:39 AM
RE: Bernard CA New Tutorial Part 3 Posted by Mike Yearwood @ 12/27/2008 4:07:55 PM
RE: Bernard CA New Tutorial Part 3 Posted by Benny Thomas @ 12/28/2008 2:04:35 PM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/29/2008 3:41:41 AM
RE: Bernard CA New Tutorial Part 3 Posted by Benny Thomas @ 12/29/2008 9:35:38 AM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/29/2008 6:02:04 PM
RE: Bernard CA New Tutorial Part 3 Posted by Mike Yearwood @ 12/29/2008 8:45:10 PM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/30/2008 2:50:22 AM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/30/2008 2:56:26 AM
RE: Bernard CA New Tutorial Part 3 Posted by Mike Yearwood @ 12/30/2008 4:01:38 AM
RE: Bernard CA New Tutorial Part 3 Posted by Bernard Bout @ 12/31/2008 5:39:06 AM
RE: Bernard CA New Tutorial Part 3 Posted by Mike Yearwood @ 12/31/2008 4:11:38 PM