I'm hoping that we will be overhauling our system to use ASP.NET MVC, however all of the examples provided tend to use LINQ to SQL. We were told by a LINQ developer than it is actually slower than calling a store procedure.
Furthermore, how would you call a stored procedure for output using MVC? I'm not entirely sure LINQ would meet o...
Quite often our systems call stored procedures which output multiple tables worth of results. Previously we used XML outputs to get each table and relate them correctly using XSLT. If I were using ASP.NET MVC with LINQ calling a stored procedure, how do I get each of the tables and then output the data as necessary?
...
Does anyone know a way to access the text of stored procedures using LINQ to SQL? I'd like to audit a set of stored procedures to check that they contain all contain some common code.
It feels like there should be a nice way of opening them through a LINQ to SQL data context but I don't know how. Any suggestions?
...
Hi all i'm looking for a way to pass in a generated id from a sproc to another sproc.
i.e.
@name varchar(12),
@descript varchar(55)
@test_date date,
@test_result varchar(1)
BEGIN
EXEC ts_create_item @name, @descript
END
if (@test_date is not null) or (isnull(@test_result_id,'')!='')
BEGIN
Exec ts_update_test_results @itemid(gener...
How do you track/manage your stored procedures, views, and functions in SQL Server?
I'd like to use Subversion, but it looks like I would have to just save & commit the CREATE/ALTER statements. That might work okay for me, but I suspect I'd end up doing a lot of nagging.
Is anyone using versioning with their databases? Is there a bette...
A fairly comprehensive query of the brain has turned up a thousand and one ways to pass variable length parameter lists that involve such methods as:
CLR based methods for parsing strings to lists of integers
Table valued functions that require the presence of a 'Numbers' table (wtf?)
Passing the data as XML
Our requirements are to p...
I need to dynamically populate an Oracle cursor (Oracle 10g). The SQL statement changes, based off of the input value to pull from different tables, and columns. What I don't want to do is have to maintain a temporary table that I truncate and load everytime the sproc is executed. Here is what I am currently doing, but if there is ano...
I have some legacy code that I'm rewriting using SubSonic to help the future maintainers. For the most part it's been relatively simple, as everything makes a stored procedure call. But now I'm having some difficulty with some tightly-coupled ADO.NET code.
The code depends on the SqlDataAdapter to decide when to call an INSERT or UPDATE...
So I have this weird problem with an SQL Server stored procedure. Basically I have this long and complex procedure. Something like this:
SELECT Table1.col1, Table2.col2, col3
FROM Table1 INNER JOIN Table2
Table2 INNER JOIN Table3
-----------------------
-----------------------
(Lots more joins)
WHERE Table1.Col1 = db...
Hi folks,
whenever i drag-n-drop a stored procedure onto my Context canvas, the parameters/arguments for the stored procedure are all nullable.
Why is this? Is it because of how i've declared my parameters inside the stored procudure itself?
Besides manually creating my stored procedure methods in the Context partial class (or drag-n-d...
I'm trying to do the following in a proc, but getting an incorrect syntax error:
SELECT TOP @NumberOfResultsToReturn *
What am I doing wrong here? Thanks.
...
Can anyone help me with this error. It works when I try the first procedure but not the second when I enter two numbers. Any ideas?
create or replace package LE2_P1
is
procedure GENERATE_MULTIPLICATION_TABLE(p_axis_both in number);
procedure GENERATE_MUTLIPLICATION_TABLE(p_axis_x in number, p_axis_y in number);
end LE2_P1;
/
create or ...
How can I export the content of a stored procedure using a SQL Statement?
...
I'm looking for a C# code generator which generate C# automatically to access stored procedures on Oracle Database.
For instance, if I have some packages on schema DEV like:
PACKAGE1 with FUNC1, FUN2
PACKAGE2 with FUNC3, FUN4
The generator creates code to run from C# the following code:
int a = PACKAGE1.FUNC1(12, 34, "hello");
An...
Certainly there is some type of context switching, marshaling, serializing, etc that takes place when you choose to write a stored procedure in NET vs T/SQL.
Are there any hard facts about this overhead as it relates to making a decision about using .NET vs T/SQL for stored procedures?
What factors do you use in order to make the decis...
I want to create a stored procedure that takes a simple SELECT statement and return the resultset as a CSV string. So the basic idea is get the sql statement from user input, run it using EXEC(@stmt) and convert the resultset to text using cursors. However, as SQLServer doesn't allow:
select * from storedprocedure(@sqlStmt)
UDF with E...
Working with SSRS and a SQL 2000 source, I have a stored procedure that takes three parameters and returns a result set. I have a dataset with the Command Type set to StoredProcedure and the procedure name in the Query String. When I attempt to execute the procedure in Visual Studio/BIDS, the Define Query Parameters dialog box presents w...
I have a bunch of utility procedures that just check for some conditions in the database and return a flag result. These procedures are run with READ UNCOMMITTED isolation level, equivalent to WITH NOLOCK.
I also have more complex procedures that are run with SERIALIZABLE isolation level. They also happen to have these same kind of chec...
I've created a simple parameterless stored procedure which I've pasted below. I've imported the stored procedure to my Entity Model and created a Function Import. The function in the model is never created and I am unable to execute this stored procedure using the ADO.NET Entity Framework. I've opened the .edmx file in XML view and have ...
Hi Guys,
Lemme explain the scenario:
I need to fetch all the Metadata of Files, i.e., Title, author, subject.. and Custom Attributes.( Custom attributes are not fixed, they are not fixed and can be of any numbers).
Now to Store this Struvture I have Designed a DB like :
MainTable:
FileID, FileName, Title, Author, Subject
and To Store C...