Set the connection duration when using ADO.NET

Demonstrates the configuration of the maximum number of seconds a connection can persist when connecting to Cloud SQL for SQL Server using the ADO.NET Connection object.

Documentation pages that include this code sample

To view the code sample used in context, see the following documentation:

Code sample


// ADO.NET connection pooler removes a connection
// from the pool after it's been idle for approximately
// 4-8 minutes, or if the pooler detects that the
// connection with the server no longer exists.

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.