Hello friends, i need to retrive table data from postgre sql in postgre below query works fine
SELECT * from SmtpCredentials where ID=1
but in front end c# code i received issue as this table does not exist
try
{
NpgsqlConnection pgCon = new NpgsqlConnection(connection);
pgCon.Open();
NpgsqlCommand cmd = new NpgsqlCommand();
cmd.Connection = pgCon;
cmd.CommandText = ("SELECT * from SmtpCredentials where ID=1");
cmd.CommandType = CommandType.Text;
NpgsqlDataAdapter da = new NpgsqlDataAdapter(cmd);
cmd.ExecuteNonQuery();
cmd.Dispose();
pgCon.Close();
}
catch(Exception ex)
{
}
please help