Ejemplo n.º 1
0
 private void button10_Click(object sender, EventArgs e)
 {
     if (odbc_con != null)
     {
         odbc_con.Disconnect();
         this.dataGridView1.DataSource = null;
         odbc_con = null;
     }
 }
Ejemplo n.º 2
0
 private void button9_Click(object sender, EventArgs e)
 {
     /*
      * Need to add ODBC DSN entry in...
      * C:\Windows\System32\odbcad32.exe
      * C:\Windows\SysWOW64\odbcad32.exe [User/System DSN] // under 64-bit OS  *** THIS ***
      * ODBC Name=DSN
      */
     if (odbc_con == null)
     {
         odbc_con = new SQL_odbc_connector("VirtualBoxVM", "Administrator", "Pa$$word");
         this.dataGridView1.DataSource = odbc_con.SelectTable("Table1");
     }
 }