string connectionString = "Server=192.168.1.13;Port=5432;Database=CRM;User Id=postgres;Password=jeetsingh;Integrated Security=true;"; System.Data.IDbConnection dbcon; dbcon = new NpgsqlConnection(connectionString); dbcon.Open(); System.Data.IDbCommand dbcmd = dbcon.CreateCommand(); string sql = "select table_name from information_schema.tables where table_schema NOT IN ('pg_catalog', 'information_schema');"; dbcmd.CommandText = sql; System.Data.IDataReader reader = dbcmd.ExecuteReader(); DropDownList3.DataSource = reader; DropDownList3.DataValueField = "table_name"; DropDownList3.DataTextField = "table_name"; DropDownList3.DataBind(); reader.Close(); reader = null; dbcmd.Dispose(); dbcmd = null; dbcon.Close(); dbcon = null;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)