Solved

SQL Server Stored Procedures and Transaction Questions

Posted on 2007-11-21
3
572 Views
Last Modified: 2008-02-02
Hello Experts!
Stored Procedures:
Is it possible to pass an array of parameters object directly to a stored procedure? I mean I don;t want to pass each parameter individualy, but pass a single array containing all pre-configured paramentes to the stored procedure.
I would like to see an example using C#.

Transactions:
The SqlTransaction object has the IsolationLevel property. I understand perfectly the ReadUncomminted, ReadComminted, RepeatableRead and Serializable isolation levels, but I have no idea about what the Unspecified level is. When, how and what for is it used?

Thanks!
0
Comment
Question by:andrepires
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
Yveau earned 167 total points
ID: 20330658
Stored Procedures:
No, there is not an array type in SQL Server. Alternatives is passing a parameter of type table or passing a string like: 'parm1=value1, parm2=value2, ...'

Transactions:
... unspecified is probably the 'use whatever the server is using at this moment, don't worry about it, just run the SQL code!' option. Not sure on this one ...

Hope this helps ...
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 167 total points
ID: 20332544
>Is it possible to pass an array of parameters object directly to a stored procedure?
Eventhough there is no array datatype, we can pass those values as CSV (Comma separated values). The logic should be implemented inside the sp to handle these.


0
 
LVL 12

Assisted Solution

by:kselvia
kselvia earned 166 total points
ID: 20337177
Here are a couple of examples of using csv values as stores procedure arguments

http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm#top

http://www.sommarskog.se/arrays-in-sql-2005.html
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question