FCFL.NET Common Library - API Reference
GetConnection(String) Method

A full connection string that is compatible with the underlying database type. See the remarks for information on how to generate safe connection strings.
Gets an IDbConnection object instance of the correct type for the underlying database (i.e. SqlConnection for MSSQL) that is prepared to connect to the specified database using the specified connection string.
Syntax
'Declaration
 
Public Overloads MustOverride Function GetConnection( _
   ByVal conStr As String _
) As IDbConnection
public abstract IDbConnection GetConnection( 
   string conStr
)

Parameters

conStr
A full connection string that is compatible with the underlying database type. See the remarks for information on how to generate safe connection strings.

Return Value

An IDbConnection object instance of the correct type for the underlying database (i.e. SqlConnection for MSSQL).
Remarks

The connection instance is not open by default. In order to open the connection, use the Open method on the IDbConnection reference returned by this method.

 

To generate connection strings in a database-agnostic fashion, please see the ConstructConnectionString and the CreateConnectionString methods.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

DbProvider Class
DbProvider Members
Overload List

 

 


© 2010 Dovetail Software, Inc. - All rights reserved.
- Clarify, Amdocs, and related products and names are copyright and trademark of Amdocs, Inc.
- .NET, Visual Studio.NET, C#, Visual Basic and related products are trademark of Microsoft corporation.

Send comments on this topic.