If I have the following XML being passed as a parameter into a stored procedure.
View Complete Post
View Complete Post
One major inconvenience of using SQL stored procedures from code is having to match type information. You have to write long wrapper functions around the procedures just to expose the data types. In the .NET Framework, however, the reflection services of the System.Reflection namespace allow you to query rich metadata that describe data types. This article explains how to use reflection in .NET to end your stored procedure nightmares. The author creates four custom classes, including one that generates a SQLCommand object based on the metadata of a method. Using this library, you'll be on your way to automating the generation of stored procedures.
MSDN Magazine August 2002
Edited by Nancy Michell
MSDN Magazine May 2002
I need to insert/update data to 3 or more tables on a single button click.What is best method for achieving this?I am using mysql as my DB.
Thanks for your valuable reply in advance.
How to write Stored Procedure for Insert Data & Execute it in MS SQL?
I tried it and it only returns the first table.
I know I'll probably never get an answer to this because it seems that no one uses the Data View Web Part and there is a dearth of documentation (sigh), but here goes...
In MOSS2007, I need to call a stored procedure and get the data back and display it in the Data View Web Part.ÃÂ I can do that.
The problem is enabling sorting.ÃÂ I can enable sorting in the DVWP and it allows me to click the column headings and supposedly sort the data - but it doesn't sort it.ÃÂ It does a postback, but doesn't affect the output.
I did some tracing with SQL Profiler, and found that if I use a SELECT statement, the sorting causes the web part to add the "ORDER BY" clause using the appropriate field.
However, since this is a stored proc, it does not seem to do anything - it just keeps calling the same stored proc over and over.
What I suppose I need it to do is pass the stored proc a parameter to tell it what order to sort the data - but I don't see any way to do that.ÃÂ I can pass the stored proc parameters via the DVWP, but how do I figure out what sort field was selected and pass that?ÃÂ Anyone know?
I I have an ASP.Net web site I built using Visual Studio 2008. I also have a SQL 2005 database I use with this web site. I presently use MS SQL Server MManagement Studio Express to add / modify SQL tables, stored procedures, etc.
But I want to now maintain my SQL datbase directly from my Visual Studo 2008 where I maintain my ASP,Net web site. I have created a script from my QL DB that creates all my existing tables and stored procedures. Can I somehow run this to create the necessary source files within VS 2008?
Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?
I am trying to insert data to Excel Document using OLEDB as follows:-
sql = "Insert into [MyFirstSheet$] (" + Title1 + "," +Title2 + "," + Title3 + ")
values('" + Value1 + "','" + Value2 + "','" + Value2 + "')";
myCommand.CommandText = sql;
But, the Title1 ,Title2, Title3 are in the 3rd row of the Excel Document. So, the data is not inserted.
I'm using Enterprise Library Logging feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data is not logged in the Formatted Mesage column which is of data Type nText .
I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.
Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.
Thanks In Advance.
Language Integrated Query makes lots of things easier. Here we put LINQ, or more specifically the LINQ to SQL provider, to use testing SQL stored procedures.
Dr. James McCaffrey
MSDN Magazine April 2008
SQL Server 2005 introduces a lot of new features, but it also enhances the popular and oft-used Transact-SQL (T-SQL) language. Changes include the introduction of new datatypes to store large values using the MAX indicator, the integration of enhanced XML querying and data modification with XQuery, and the new XML datatype.
MSDN Magazine March 2006
Dealing with error handling between T-SQL and a calling application, evaluating when a field's value has changed, and creating auditing tables in SQL ServerT are all common issues that developers must tackle.
MSDN Magazine April 2004
Design-time automation makes coding faster and ensures that all the procedures generated use the same naming conventions and structure. In an effort to improve their coding efficiency in a large SQL project, the authors wrote a set of design-time stored procedures that generate run-time stored procedures, and have used them in project after project ever since. Recently, the authors updated their procedures to make use of SQL Server 2000 features, including user-defined functions. This article covers the creation and execution of these dynamic T-SQL scripts to automate the coding of common database stored procedures.
Peter W. DeBetta and J. Byer Hill
MSDN Magazine April 2003