Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string conDDNS;
- FbConnection conexaoDDNS;
- protected void Abrir_Fechar_Click(object sender, EventArgs e)
- {
- try
- {
- this.conDDNS = "DRIVER=InterBase/Firebird(r) driver;User=SYSDBA;Password=masterkey;Database=localhost:C:/AdCom/ADCOM.FDB";
- this.conexaoDDNS = new FbConnection(conDDNS);
- this.conexaoDDNS.Open();
- ListItem item = new ListItem("Conexão aberta");
- ListBox1.Items.Add(item);
- this.conexaoDDNS.Dispose();
- this.conexaoDDNS.Close();
- ListItem item2 = new ListItem("Conexão fechada");
- ListBox1.Items.Add(item2);
- }
- catch (Exception erro)
- {
- ListItem item = new ListItem(erro.ToString());
- ListBox1.Items.Add(item);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement