This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello! Can I run UDF function located in MS SQL Server 2005 database using Lightspeed? Function can be found here (ExpandRecurrence_UDF.zip): http://www.telerik.com/community/forums/thread/b311D-bettda.aspx#583231 Thanks in advance |
|
|
You can't call a UDF directly, but if you can wrap it in a stored procedure, then you can call that if you're using a recent nightly. (Stored procedure support is *not* present in 2.1 RTM.) See http://www.mindscape.co.nz/blog/index.php/2008/10/20/stored-procedures-and-lightspeed/ for how. Thus, in the ExpandRecurrence example, if you define the following stored proc: CREATE PROCEDURE GetExpandedAppointments( and have a LightSpeed Appointment entity class with Subject, StartDate and EndDate properties, you should be able to go unitOfWork.Find<Appointment>(new ProcedureQuery("GetExpandedAppointments", ...)) and get at the UDF that way. (Please note I haven't tested this! But let us know if it doesn't work and we will investigate.) Note that there is currently no designer or LINQ support for calling stored procedures. |
|
|
Small question .. when can we expect adding support for views and stored procedures to model designer? One thing more but this is not important at all :) I'm using resolution 1920x1200 and background (gradient) of model designer just ends in some place. |
|
|
I'm hoping to look at designer support for stored procedures this week, but I can't promise anything. I will have a look at adding view support while I'm in there, but there are a couple of reasons why this will probably take a bit longer: 1. We have some design work to do first on making views first-class citizens in LightSpeed. (We currently only support one view or table per entity type, whereas
views are often used as canned queries so there may be multiple views
returning the same entity type e.g. you should be able to create Order
entities from any of the All Orders, Unfulfilled Orders or Recent
Orders views.) I don't really want to do designer support until we have a more definite roadmap for views in the core. 2. A lot of the effort in implementing designer support for views and sprocs will be per database engine (extracting metadata is a highly database-specific operation). For sprocs, we only need to do this on SQL Server and Oracle at the moment; for views, we will need to do 7 or 8 databases I think. The gradient glitch is an artefact of the Visual Studio integration toolkit we're using. It annoys us too *grin*. |
|