티스토리 뷰

namespace Fetch

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }


        //MySqlConnection conn = new MySqlConnection("");

        private MySqlConnection myConn = new MySqlConnection("datasource=localhost;port=3306;username=root;password=1234");


        private void button1_Click(object sender, EventArgs e)

        {

            MySqlDataAdapter mdf = new MySqlDataAdapter("select * from wdata_mdb.connect_history where date between '"+dateTimePicker1.Value.ToString()+"' and '"+dateTimePicker2.Value.ToString()+"' ", myConn);

            DataTable sd = new DataTable();

            mdf.Fill(sd);

            dataGridView1.DataSource = sd;


        }

    }

}

댓글
최근에 달린 댓글
글 보관함
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Total
Today
Yesterday
    뽀로로친구에디
    최근에 올라온 글