How to add event to some fields to respond to one method?
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


««12

How to add event to some fields to respond to...Expand / Collapse
Author
Message
Posted 03/14/2008 10:33:50 AM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 2 days ago @ 8:30:35 PM
Posts: 1,164, Visits: 2,903
Edhy,

Just offering some options. You never know when another trick will be needed!

Trent,
I'd agree if it was anything complicated or needed data outside of the current row or in some other table or needed parameters, etc. However, if it's just a simple manipulation of fields in the current row, then I'd lean toward the calculated field. Like I said, I'm using a few of these and they are real easy to deal with, as they just become strongly typed fields in the BO and are always available. Most of the time, things are more complicated and I use the other methods suggested, UDF, sproc, custom BO property...but sometimes...
Post #14886
Posted 03/14/2008 1:39:11 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
All good advice, Greg.  I will warn you, though, that the larger your data set becomes, the slower a calculated field becomes...we have just gone through this very thing.  So we are bit more leary of calculated fields (in this manner), especially when dealing with character data, than we once were.  But we will still do this under certain conditions.  If you are expecting this particular table to get very large, then you should probably go with a UDF or sproc, otherwise the calculated field is great.  Also, you can test this against your database and see where you get the best performance.  Use the SET STATISTICS commands to see what query performance difference you get:

SET STATISTICS PROFILE ON
SET STATISTICS TIME ON

That would be the TRUE test on your data.  Also, it can be a really good idea to add some indexes on those fields as well.

Post #14900
Posted 03/14/2008 1:56:14 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 2 days ago @ 8:30:35 PM
Posts: 1,164, Visits: 2,903
Hmmmm...good info Trent. The tables I'm using this on are small and likely to remain small....no wonder I've had no problems. I'll keep this in mind though, going forward. This is thread is another excellent example of why SF rocks
Post #14906
Posted 03/14/2008 2:26:47 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
LOL....thanks, Greg!  I always truly appreciate your contributions out here!
Post #14912
« Prev Topic | Next Topic »

««12

Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 1:23am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.