GetConnectionFromId() public method

Returns the SqlConnection object corresponding to the given connection number.
public GetConnectionFromId ( int connectionNumber ) : SqlConnection
connectionNumber int serial number of the connection within the collection
return System.Data.SqlClient.SqlConnection
示例#1
0
 public SqlConnection GetConnectionFromId(int connectionNumber)
 {
     try
     {
         // let the sibling method in the wrapped TSLibrary object contain the logic
         return(TSLib.GetConnectionFromId(connectionNumber));
     }
     catch (Exception e)
     {
         ErrorMessage = e.Message;
         return(null);
     }
 }