Provedor usado : FireBirdClient
namespace utilizado : FirebirdSql.Data.FirebirdClient;
Incluir a referência ao provedor FireBirdSQLData.FireBirdClient
namespace utilizado : FirebirdSql.Data.FirebirdClient;
Incluir a referência ao provedor FireBirdSQLData.FireBirdClient
private void button1_Click(object sender, EventArgs e)
{ string strConn = @"DataSource=localhost; Database=C:\dados\BancoDados.FDB; UserId=SYSDBA; Pwd=masterkey"; FbConnection fbConn = new FbConnection(strConn); FbCommand fbCmd = new FbCommand("Select * from NomeTabela",fbConn); try { fbConn.Open(); FbDataAdapter fbDa = new FbDataAdapter(fbCmd); DataTable dtEmployee = new DataTable(); fbDa.Fill(dtEmployee); gdvDadosFireBird.DataSource = dtEmployee; } catch (FbException fbex) { MessageBox.Show("Erro ao acessar o FireBird " + fbex.Message,"Erro"); } finally { fbConn.Close(); } }
Será que você poderia me dar uma ajuda?
ResponderExcluirEstou com o seguinte erro ao tentar conectar com firebird:
The type initializer for 'FirebirdSql.Data.Common.TimeoutHelper' threw an exception.
Estou com um problema igual ao do Adilon Gomes, minha aplicação esta rodando perfeito no Win7 e Win8 (tanto no x86 como no x64), mais no XP esta apresentando erro
ResponderExcluir"The type initializer for 'FirebirdSql.Data.Common.TimeoutHelper' threw an exception."