Module Module1 Public vConexao As New FbConnection Public v_Sql As New FbConnectionStringBuilder Public v_Comandos As FbCommand 'Para insert, update, etc Public v_Consultas As FbDataReader 'Para leitura de dados provenientes de selects Public Conectado As Boolean = False Public Function PreparaConexao() Try vConexao = New FbConnection("User=SYSDBA;Password=masterkey;Database=C:\Midia\Sistema de Campanhas\Sistema de Campanhas\Banco\CAMPANHAS.fdb;DataSource=localhost;Dialect=3;") vConexao.Open() Conectado = True Catch Conectado = False End Try vConexao.Close() End Function