Backup and Restore a PostgreSQL Database Get link Facebook X Pinterest Email Other Apps - September 26, 2019 Backup : Backup database in .sql file and with role from dropdown Restore : C:\Program Files\PostgreSQL\9.4\bin>psql -U postgres db_cpm <C:\CPM\cpm.sql Get link Facebook X Pinterest Email Other Apps Comments
SQL update query using joins sql server - September 26, 2018 UPDATE A SET foo = B . bar FROM TableA A JOIN TableB B ON A . col1 = B . colx WHERE ... Read more
C# DataTable to List Convert - August 09, 2017 public static List DataTableToList (this DataTable table) where T : class, new() { try { List list = new List (); foreach (var row in table.AsEnumerable()) { T obj = new T(); foreach (var prop in obj.GetType().GetProperties()) { try { PropertyInfo propertyInfo = obj.GetType().GetProperty(prop.Name); propertyInfo.SetValue(obj, Convert.ChangeType(row[prop.Name], propertyInfo.PropertyType), null); } catch { continue; } } list.Add(obj); } return list; } catch { return null; } } Re... Read more
EncryptDecrypt Web config c# - November 19, 2018 public static void WebEncryptDecrypt() { Configuration config = ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath); ConfigurationSection configSection = config.GetSection("appSettings"); ConnectionStringsSection ConSection = config.GetSection("connectionStrings") as ConnectionStringsSection; if (configSection.SectionInformation.IsProtected) { configSection.SectionInformation.UnprotectSection(); ConSection.SectionInformation.UnprotectSection(); config.Save(); ... Read more
Comments
Post a Comment