Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Classes vs. Stored Procedures

Status
Not open for further replies.

risslsu

Programmer
Jan 13, 2004
18
0
0
US
Please Help.

I have many routines that are used by multiple programs in my system. I am currently classifying these procedures and doing AddObjects to add them to form/formsets. I am getting an error saying that I cannot redefine the parameters in Method1 in _class1. This error occurs because 2 screens that are called from myformset both use Method1 in _class1. How can I fix this?

Is classifying better than stored procedures for a local and server environment?

Thanks,
Marissa
 
Marissa,

If you are getting an error message when using a method, the solution is not to abandon the method and use a stored procedure instead. Rather, the solution is to find the reason for the error and to eliminate it.

If you can give us more details of the error, we might be able to point you in the right direction.

Also, be aware that most of us prefer not to use formsets in normal application development. They are a hang-over from earlier versions and are mainly only used to provide backward compatibility.

Mike

Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks for everyone's help, but I figured it out.

At first I put Class1 on the parent form and attempted to call a method in the class from two children. This didn't work because the parameters couldn't be redefined.

Now, I am executing an AddObject to add the class to the parent. After doing this all of the parents child forms were able to use the class as many times as they wanted.

Marissa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top