FANDOM


            var sConnectionString_SQLServer = @"Data Source=.;Initial Catalog=aaKen1;Integrated Security=True";
            var sConnectionString_MSAccess = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="Authors.mdb";

            var objConn_SQLServer = new SqlConnection(sConnectionString_SQLServer);
            objConn_SQLServer.Open();
            var objConn_MSAccess = new OleDbConnection(sConnectionString_MSAccess);
            objConn_MSAccess.Open();

            string sSQL_SQLServer = "SELECT tag_name FROM gobject";
            var objCmd_SQLServer = new SqlCommand(sSQL_SQLServer, objConn_SQLServer);

            string sSQL_MSAccess = "SELECT Author FROM Authors";
            var objCmd_MSAccess = new OleDbCommand(sSQL_MSAccess, objConn_MSAccess);

            // For update, insert, delete use this:
            //objCmd_SQLServer.ExecuteNonQuery();
            //objCmd_MSAccess.ExecuteNonQuery();

            var s = new StringBuilder();
            var reader_SQL = objCmd_SQLServer.ExecuteReader();
            if (reader_SQL.HasRows)
            {
                while (reader_SQL.Read())
                    s.AppendLine(reader_SQL.GetString(0));
            }

            var reader_MSAccess = objCmd_MSAccess.ExecuteReader();
            if (reader_MSAccess.HasRows)
            {
                while (reader_MSAccess.Read())
                    s.AppendLine(reader_MSAccess.GetString(0));
            }
            textBox1.Text = s.ToString();

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.