OdbcFactory.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Odbc / OdbcFactory.cs / 1305376 / OdbcFactory.cs

                            //------------------------------------------------------------------------------ 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
// [....]
//----------------------------------------------------------------------------- 
 
using System;
using System.Data; 
using System.Data.Common;
using System.Security;
using System.Security.Permissions;
 
namespace System.Data.Odbc {
 
    public sealed class OdbcFactory : DbProviderFactory { 

        public static readonly OdbcFactory Instance = new OdbcFactory(); 

        private OdbcFactory() {
        }
 
        public override DbCommand CreateCommand() {
            return new OdbcCommand(); 
        } 

        public override DbCommandBuilder CreateCommandBuilder() { 
            return new OdbcCommandBuilder();
        }

        public override DbConnection CreateConnection() { 
            return new OdbcConnection();
        } 
 
        public override DbConnectionStringBuilder CreateConnectionStringBuilder() {
            return new OdbcConnectionStringBuilder(); 
        }

        public override DbDataAdapter CreateDataAdapter() {
            return new OdbcDataAdapter(); 
        }
 
        public override DbParameter CreateParameter() { 
            return new OdbcParameter();
        } 

        public override CodeAccessPermission CreatePermission(PermissionState state) {
            return new OdbcPermission(state);
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
// [....]
//----------------------------------------------------------------------------- 
 
using System;
using System.Data; 
using System.Data.Common;
using System.Security;
using System.Security.Permissions;
 
namespace System.Data.Odbc {
 
    public sealed class OdbcFactory : DbProviderFactory { 

        public static readonly OdbcFactory Instance = new OdbcFactory(); 

        private OdbcFactory() {
        }
 
        public override DbCommand CreateCommand() {
            return new OdbcCommand(); 
        } 

        public override DbCommandBuilder CreateCommandBuilder() { 
            return new OdbcCommandBuilder();
        }

        public override DbConnection CreateConnection() { 
            return new OdbcConnection();
        } 
 
        public override DbConnectionStringBuilder CreateConnectionStringBuilder() {
            return new OdbcConnectionStringBuilder(); 
        }

        public override DbDataAdapter CreateDataAdapter() {
            return new OdbcDataAdapter(); 
        }
 
        public override DbParameter CreateParameter() { 
            return new OdbcParameter();
        } 

        public override CodeAccessPermission CreatePermission(PermissionState state) {
            return new OdbcPermission(state);
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK