⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sql.cs

📁 This program is compare the data in sql server. And you can syncronize the table and views this is v
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;


namespace SQLDataCompare
{
    class sql
    {
        public DataTable sqlsorgu(string sorgu,string constr)
        {

            DataTable dt = new DataTable();
            try
            {
                SqlConnection con = new SqlConnection();
                con.ConnectionString = constr;
                con.Open();
                SqlCommand cmd = new SqlCommand(sorgu, con);

                SqlDataReader dr = cmd.ExecuteReader();
                dt.Load(dr);
                dr.Close();
                con.Close();
            }
            catch
            {
                return dt;
                //richTextBox2.Text += DateTime.Now.ToString() + "  --> Have some problems.(I am sorry Bunu denememi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -