Getting a Return Value from a Stored Procedure


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Is there some where I can find a basic subclass of the BO that has Everything that is needed to make it work so I can start adding some of these functions and not have to do it on Every BO?
Thanks in Advance.
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Terry,

Yes, there are some sample code in the forums, probably Ivan (the Google expert) may provide some links, but basically this what you have to do:
  1. Create a BO class and do not map it to any of your tables.  You could name it whatever you want, I name mine "ApplicationBaseBusinessClass.vb"
  2. Add all the custom, generic code you expect to use in all your BOs like the ones I posted here.  Also if you use some custom field properties in all your BO with the same name, here is a good place to have them all.
  3. In your current and new BO, change the "Inherits" statement from:

     Inherits MicroFour.StrataFrame.Business.BusinessLayer
to
Inherits CardTrackingSystem.Business.ApplicationBaseBusinessClass


Of course in the sample above the namespace "CardTrackingSystem" should be replace with your own NameSpace.  After that, recompile your project and start having fun with your base BO class.

Edhy Rijo

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
So let me get this straight. 
    1. I create a BO (say BaseBO) and I don't map it to any table.
    2. I then add MY Functions, Sub Routines and whatever to my BaseBO.
    3. Once I have 1 and 2 done Then when I create a new BO I change the Inherits MicroFour.Strataframe.Business.BusinessLayer
    4. to Inherits Rodeo.Business.BaseBO Where Rodeo is I believe my Namespace.
TIA.
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Yeap you are now in the right track, so go for it.  Also for your current BO all you need to do is change the Inherits to your new base BO, the same thing applies to forms and other controls.

Edhy Rijo

Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Edhy.

This might sound like a silly question but I 'Asumed' that a primary key field in SQL 'had' to be unique and you could not have duplicates ?. This must'nt be the case if you have written a routine to validate it ?? 
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Gerard O Carroll (11/30/2010)
This might sound like a silly question but I 'Asumed' that a primary key field in SQL 'had' to be unique and you could not have duplicates ?. This must'nt be the case if you have written a routine to validate it ?? 


Hi Gerard,

Nothing silly about it.  Even thought you may come across an Integer PK which is not auto incremented by the database, but you are right.  That was a code I wrote fast without testing for Terry, but was corrected in the following messages.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search