Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mySQLConnection iConn = new mySQLConnection(); /*Ceate and open connection*/
- String insertQuery = "INSERT INTO computer_screen(filecontent) VALUES(@filecontent)";
- MySqlCommand command = new MySqlCommand(insertQuery, iConn.mcon);
- command.Parameters["@filecontent"].Value = File.ReadAllBytes(@"C:\err_0422_114255.jpg");
- command.ExecuteNonQuery();
- CREATE TABLE `computer_screen` (
- `id` int AUTO_INCREMENT NOT NULL,
- `filecontent` blob,
- /* Keys */
- PRIMARY KEY (`id`)
- ) ENGINE = MyISAM;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement