Click here to Skip to main content
15,912,932 members
Home / Discussions / C#
   

C#

 
GeneralRe: ReLoad Form Problem Pin
Martin#17-Jul-07 20:08
Martin#17-Jul-07 20:08 
QuestionPassing a String Array in a Dictionary to a WCF service Pin
Projjal17-Jul-07 0:10
Projjal17-Jul-07 0:10 
AnswerRe: Passing a String Array in a Dictionary to a WCF service Pin
Eduard Keilholz17-Jul-07 0:57
Eduard Keilholz17-Jul-07 0:57 
Questiona question about using sn.exe - private key Pin
mhp13017-Jul-07 0:09
mhp13017-Jul-07 0:09 
AnswerRe: a question about using sn.exe - private key Pin
Mike Dimmick17-Jul-07 1:16
Mike Dimmick17-Jul-07 1:16 
Questiontwo commands are possible Pin
srinivassam16-Jul-07 23:52
srinivassam16-Jul-07 23:52 
AnswerRe: two commands are possible Pin
Nisar Inamdar16-Jul-07 23:59
Nisar Inamdar16-Jul-07 23:59 
AnswerRe: two commands are possible Pin
Mike Dimmick17-Jul-07 2:21
Mike Dimmick17-Jul-07 2:21 
It depends on your database, .NET Framework version, and connection string.

In any version of SQL Server and .NET Framework, you can execute as many commands as you like on one connection, as long as you close the first data reader before opening the next one. In SQL Server 2000, and .NET Framework 1.1 connecting to SQL Server 2005, you cannot execute any commands when you have a SqlDataReader open on the same connection. If using .NET Framework 2.0 with SQL Server 2005, you can use a new feature called Multiple Active Result Sets (MARS). The connection string option to control this is called MultipleActiveResultSets. It's enabled by default, but it does use more resources on the server.

If you execute commands on different connections, SQL Server will consider them as commands from different clients and you can end up blocking or deadlocking your own code.

It's generally recommended to keep connections open for the minimum time possible - the length of a transaction, which is recommended to be short. If connection pooling is turned on (as it is by default) you will normally still get back a connection object that is still actually connected to the server, so you don't pay the cost of connecting to the server again.

Stability. What an interesting concept. -- Chris Maunder

QuestionRDLC Pin
manoj_ce16-Jul-07 23:37
manoj_ce16-Jul-07 23:37 
QuestionBest practice for ADO.NET and C# Pin
matbuk16-Jul-07 23:08
matbuk16-Jul-07 23:08 
AnswerRe: Best practice for ADO.NET and C# Pin
Colin Angus Mackay16-Jul-07 23:17
Colin Angus Mackay16-Jul-07 23:17 
GeneralRe: Best practice for ADO.NET and C# Pin
matbuk16-Jul-07 23:33
matbuk16-Jul-07 23:33 
GeneralRe: Best practice for ADO.NET and C# Pin
Colin Angus Mackay16-Jul-07 23:47
Colin Angus Mackay16-Jul-07 23:47 
GeneralRe: Best practice for ADO.NET and C# Pin
matbuk16-Jul-07 23:55
matbuk16-Jul-07 23:55 
QuestionCopying one class to another Pin
Berlus16-Jul-07 22:54
Berlus16-Jul-07 22:54 
AnswerRe: Copying one class to another Pin
Martin#16-Jul-07 23:00
Martin#16-Jul-07 23:00 
QuestionText on Video using DirectX Pin
Sukhjinder_K16-Jul-07 22:46
Sukhjinder_K16-Jul-07 22:46 
AnswerRe: Text on Video using DirectX Pin
Eduard Keilholz16-Jul-07 23:44
Eduard Keilholz16-Jul-07 23:44 
QuestionXML Serialization Pin
blackjack215016-Jul-07 22:46
blackjack215016-Jul-07 22:46 
AnswerRe: XML Serialization Pin
J4amieC16-Jul-07 23:36
J4amieC16-Jul-07 23:36 
GeneralRe: XML Serialization Pin
blackjack215017-Jul-07 1:03
blackjack215017-Jul-07 1:03 
QuestionSystem Files in Deployment Pin
RoyRose7816-Jul-07 22:30
RoyRose7816-Jul-07 22:30 
AnswerRe: System Files in Deployment Pin
Colin Angus Mackay16-Jul-07 22:33
Colin Angus Mackay16-Jul-07 22:33 
QuestionRDLC report problem Pin
manoj_ce16-Jul-07 22:17
manoj_ce16-Jul-07 22:17 
QuestionCrystal Report (beginner) Pin
T.EDY16-Jul-07 21:58
T.EDY16-Jul-07 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.