none
conexão postgre

    Pergunta

  •  

    Deem olhad neste codigo e me digam se posivel o erro , nao consigo conectar?

     

    using Npgsql;

    public partial class _Default : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    string cnStr = "Server=localhost;Port=5432;User Id=postgres;Password=automac;Database=postgres";

    NpgsqlConnection conexao = new NpgsqlConnection(cnStr);

    try

    {

    conexao.Open();

    string consulta = "SELECT * FROM clientes";

    Npgsql.NpgsqlDataAdapter da = new NpgsqlDataAdapter(consulta, conexao);

    DataSet ds = new DataSet();

    da.Fill(ds);

    GridView1.DataSource = ds;

    GridView1.DataBind();

    }

    finally

    {

    conexao.Close();

    }

    }

    }

    da seguinte erro    password authentication failed for user "postgres" 
    quinta-feira, 6 de março de 2008 19:12

Todas as Respostas