Context Connection connection strings

(追記) (追記ここまで)

SQL Server 2012

Context Connection

Connecting to "self" from within your CLR stored prodedure/function. The context connection lets you execute Transact-SQL statements in the same context (connection) that your code was invoked in the first place.

C#
using(SqlConnection connection = new SqlConnection("context connection=true"))
{
connection.Open();
// Use the connection
}

VB.Net
Using connection as new SqlConnection("context connection=true")
connection.Open()
' Use the connection
End Using

SQL Server 2008

Context Connection

Connecting to "self" from within your CLR stored prodedure/function. The context connection lets you execute Transact-SQL statements in the same context (connection) that your code was invoked in the first place.

C#
using(SqlConnection connection = new SqlConnection("context connection=true"))
{
connection.Open();
// Use the connection
}

VB.Net
Using connection as new SqlConnection("context connection=true")
connection.Open()
' Use the connection
End Using

SQL Server 2005

Context Connection

Connecting to "self" from within your CLR stored prodedure/function. The context connection lets you execute Transact-SQL statements in the same context (connection) that your code was invoked in the first place.

C#
using(SqlConnection connection = new SqlConnection("context connection=true"))
{
connection.Open();
// Use the connection
}

VB.Net
Using connection as new SqlConnection("context connection=true")
connection.Open()
' Use the connection
End Using

AltStyle によって変換されたページ (->オリジナル) /