Programming/MSSQL

삽입 SQL 문

홍상길 2010. 2. 9. 13:15


        // 삽입 SQL 문
        string sql1 = "Insert into FreeBoard (Num, Id, Title, PostIP, Content) values ("
                    + "1,"
                    + "'" + txtId.Text + "',"
                    + "'" + txtTitle.Text + "',"
                    + "'" + Request.UserHostAddress + "',"
                    + "'" + txtContent.Text + "')";



//DBConn  -  DB 연동 클래스

DBConn conn = new DBConn();

conn.ExecuteSQL(sql1);
conn.Close();