none
Whats wrong with this that i cant get connected..

    Question

  •         public DataSet JRR(int id)
            {
                DataSet dsJRR = new DataSet();
      *******>  NpgsqlConnection conn = new NpgsqlConnection("Server=localhost;Port=5432;User Id=XXXXXX;Password=XXXXXX;Database=JRR;");
                NpgsqlCommand command = new NpgsqlCommand("select * from jrrinfo", conn);
                
                conn.Open();
                NpgsqlDataReader dr = command.ExecuteReader();
                NpgsqlDataAdapter npgData = new NpgsqlDataAdapter(command);
                try
                {
                    while (dr.Read())
                    {
                        int i;
                        for (i = 0; i < dr.FieldCount; i++)
                        {
                            npgData.Fill(dsJRR, "JRRInfo");
                            Console.Write("{0} \t", dr[i]);
                        }
                        Console.WriteLine();
                    }
                }
                catch { }
                finally
                {
                    conn.Close();
                }
                return dsJRR;
            }

    I am trying to debug this so i can populate my application.. it makes it to the connection line and never displays the data on the page.. no error or exception, just loads the page and never makes it past the connection line to the command line..

    • Moved by Annabella Luo Thursday, March 29, 2012 1:01 AM (From:Windows Presentation Foundation (WPF))
    Tuesday, March 13, 2012 4:25 PM

Answers

All replies