Beispiel #1
0
        public static CdbcConnection getConnection(DatabaseProductType databaseProductType)
        {
            CdbcConnection con = new CdbcConnection(connectionString);

            //In case of in CDBCservice's web.config.
            //  <userAuthentication authMethod="UserPsk">
            con.UserId  = UtilCommon.UserId;
            con.UserPsk = UtilCommon.UserPsk;

            //In case of in CDBCservice's web.config.
            //  <userAuthentication authMethod="Basic">
            // con.UserId = "** userid **";
            // con.UserPassword = "******";

            //In case of in CDBCservice's web.config.
            //  <userAuthentication authMethod="None">
            //You need not set UserId , UserPsk or UserPassword
            // <userAuthentication authMethod="None"> is not recommended for production use.


            //In case of in CDBCservice's web.config.
            //  <clientApplicationAuthentication authMethod="ApplicationPsk">
            con.ApplicationId  = UtilCommon.ApplicationId;
            con.ApplicationPsk = UtilCommon.ApplicationPsk;

            //In case of in CDBCservice's web.config.
            //  <clientApplicationAuthentication authMethod="None">
            //You need not set ApplicationId or ApplicationPsk
            //  <clientApplicationAuthentication authMethod="None"> is not recommended for production use.

            con.DatabaseProduct = databaseProductType;
            return(con);
        }
Beispiel #2
0
        private void OpenSample(DatabaseProductType dbType)
        {
            this.Hide();
            FrmSamples frmSample = new FrmSamples(dbType);

            frmSample.ShowDialog();
            frmSample.Dispose();
            this.Show();
        }
Beispiel #3
0
 public FrmSamples(DatabaseProductType sampleDatabaseProductType)
 {
     InitializeComponent();
     this.CurrentDatabaseProductType = sampleDatabaseProductType;
     Console.SetOut(new ControlWriter(txtOutput));
 }