/* void Treeview_Load(String text_name) // 트리뷰에 들어갈 데이터베이스를 로드한다. { treeView1.Nodes.Clear(); SQLiteCommand cmdDataBase = new SQLiteCommand("select DISTINCT line from factory where layout_name='" + text_name + "';", cn); cn.Open(); SQLiteDataReader dr = cmdDataBase.ExecuteReader(); try { while (dr.Read()) { String temp; int count = 0; TreeNode node = new TreeNode(dr["line"].ToString()); temp = dr..
void item_image_load() //이미지 로드 { string Query = "select * from factory where part='" + this.comboBox2.Text + "';"; SQLiteCommand cmdDataBase = new SQLiteCommand(Query, cn); SQLiteDataReader myReader; try { cn.Open(); myReader = cmdDataBase.ExecuteReader(); while (myReader.Read()) { byte[] imgg = (byte[])(myReader["item_image"]); if (imgg == null) this.pictureBox1.Image = null; else { MemoryStre..
날짜조회하기 및 데이타그리드뷰에 mysql open하지 않고 뷰하기 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 MySqlDataAdapte..
c# 윈폼 콤보박스에 mysql 내용 open하지 않고 불러오기 string query = "select * from customer_tab";MySqlCommand cmd; cmd = new MySqlCommand(query, conn); MySqlDataAdapter da = new MySqlDataAdapter(cmd);DataTable table = new DataTable("myTable");da.Fill(table); foreach (DataRow row in table.Rows){ for (int i = 0; i < row.ItemArray.Length; i++) { comboBox1.Items.Add(row.ItemArray[1].ToString()); }} 내가 적용한 코드 MySqlCo..
Data too long for column 'content' at row 1 jpg는 정상저장, png와 bmp는 저장안되고 이와 같은 에러 문구가 나옴 제한사항을 없앰select @@global.sql_mode;STRICT_TRANS_TABLES, NO_ENGINE_SUBSTITUION select @@global sql_mode = '' ;STRICT_TRANS_TABLES, NO_ENGINE_SUBSTITUION 를 지움 MySQL Command 창에서 하는 거임
//카운트 count++; this.textBox1.Text = count.ToString(); this.textBox2.Text = count.ToString(); this.textBox3.Text = count.ToString(); this.textBox4.Text = count.ToString(); this.textBox5.Text = count.ToString(); this.textBox6.Text = count.ToString(); this.textBox7.Text = count.ToString(); this.textBox8.Text = count.ToString(); this.textBox9.Text = count.ToString(); this.textBox10.Text = count.ToSt..
int no; private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView2.Rows[e.RowIndex]; no = Convert.ToInt32(row.Cells["순"].Value.ToString()); this.comboBox_chart_type.Text = row.Cells["타입"].Value.ToString(); this.textBox_title.Text = row.Cells["항목"].Value.ToString(); this.textBox_time.Text = row.Cells["시간"].Val..
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_his..
PointPairList userClickrList = new PointPairList(); LineItem userClickCurve = new LineItem("userClickCurve"); private void z2_MouseClick(object sender, MouseEventArgs e) // ZedGraph 클릭시 빨간선 나옴. { // Create an instance of Graph Pane GraphPane myPane = z2.GraphPane; // x & y variables to store the axis values double xVal; double yVal; // Clear the previous values if any userClickrList.Clear(); myP..
private void checkBox8_CheckedChanged(object sender, EventArgs e) //그래프 전압 { ysin = Convert.ToInt32(this.tb_volt_min.Text); ycos = Convert.ToInt32(this.tb_volt_max.Text); z1.GraphPane.CurveList.Clear(); z1.GraphPane.GraphObjList.Clear(); CreateGraph(ysin, ycos); } private void CreateGraph(int ysin, int ycos) { GraphPane myPane = z1.GraphPane; myPane.Title.Text = "ZedGraph Test"; myPane.XAxis.Tit..