Exemple #1
0
        private void sqlDataSource1_ConfigureDataConnection(object sender, DevExpress.DataAccess.Sql.ConfigureDataConnectionEventArgs e)
        {
            //string connectionString = @"XpoProvider=MSSqlServer;Data Source=('" + ClassGenLib.ServerIP + "');User ID=sa;Password=;Initial Catalog=database;Persist Security Info=true;";
            //CustomStringConnectionParameters connectionParameters = new CustomStringConnectionParameters(connectionString);
            //SqlDataSource ds = new SqlDataSource(connectionParameters);
            //this.DataSource = ds;

            string connectionString = @"XpoProvider=MSSqlServer;Data Source=('" + ClassGenLib.ServerIP + "');User ID=sa;Password=;Initial Catalog=database;Persist Security Info=true;";
            CustomStringConnectionParameters connectionParameters = new CustomStringConnectionParameters(connectionString);
            SqlDataSource ds = new SqlDataSource(connectionParameters);

            sqlDataSource1.Connection.ConnectionString = ClassDBUtils.DBConnString;
        }
Exemple #2
0
        private void sqlDataSource1_ConfigureDataConnection(object sender, DevExpress.DataAccess.Sql.ConfigureDataConnectionEventArgs e)
        {
            //using (var settings = new ApplicationSettings())
            //{
            //    var sqlConnection = new SqlConnection(settings.GetConnectionString("connBNOTE"));
            //    var sqlConnectionStringBuilder = new SqlConnectionStringBuilder(sqlConnection.ConnectionString);
            //    var dataConnectionParametersBase = new MsSqlConnectionParameters
            //    {
            //        ServerName = sqlConnectionStringBuilder.DataSource,
            //        DatabaseName = sqlConnectionStringBuilder.InitialCatalog,
            //        UserName = sqlConnectionStringBuilder.UserID,
            //        Password = sqlConnectionStringBuilder.Password,
            //        AuthorizationType = sqlConnectionStringBuilder.IntegratedSecurity ? MsSqlAuthorizationType.Windows : MsSqlAuthorizationType.SqlServer
            //    };
            //    e.ConnectionParameters = dataConnectionParametersBase;
            //}

            //string connectionString = @"XpoProvider=MSSqlServer;Data Source=('"+ClassGenLib.ServerIP+"');User ID=sa;Password=;Initial Catalog=database;Persist Security Info=true;";
            string connectionString = @"XpoProvider=MSSqlServer;data source=.;User ID=sa;Password=;Initial Catalog=NewFalconTest;Persist Security Info=true;";
            CustomStringConnectionParameters connectionParameters = new CustomStringConnectionParameters(connectionString);
            SqlDataSource ds = new SqlDataSource(connectionParameters);
            //this.DataSource = ds;
        }
Exemple #3
0
 private void sqlDataSource1_ConfigureDataConnection(object sender, DevExpress.DataAccess.Sql.ConfigureDataConnectionEventArgs e)
 {
     e.ConnectionParameters = new MsSqlConnectionParameters(".", "Newfalcon20", "sa", "", MsSqlAuthorizationType.SqlServer);
 }
Exemple #4
0
 private void ConfigureDataConnection(object sender, DevExpress.DataAccess.Sql.ConfigureDataConnectionEventArgs e)
 {
     e.ConnectionParameters = new MsSqlConnectionParameters(ArsLibrary.dbServerName, ArsLibrary.dbName, ArsLibrary.dbUserName, ArsLibrary.dbPassword, MsSqlAuthorizationType.SqlServer);
 }