Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Data.Odbc;
  10.  
  11. namespace WindowsFormsApplication1
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         string cmd = "UPDATE accounts SET premdays = premdays + 7 ";
  21.  
  22.         private void button1_Click(object sender, EventArgs e)
  23.         {
  24.             OdbcConnection Connection = new OdbcConnection("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=Server; User=root;Password=infernal@77;Option=3;");
  25.             Connection.Open();
  26.             OdbcCommand Command = new OdbcCommand(cmd, Connection);
  27.             OdbcDataReader Reader = Command.ExecuteReader();
  28.             MessageBox.Show("Complete");
  29.             Connection.Close();
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement