Script Storage Update

This is an update to a previous post. In another post on this site, it was said that Dropbox Paper is the code storage of choice. This has changed. As of today, I much prefer using Microsoft’s GIT code repository known as: The benefits are numerous. Ability to revert back to previous versions Ability […]

Script Storage

Update here: Script Storage Update Throughout my career, my scripts have been a vital piece of my work. Where I store them has changed over the years. The challenge has been in finding a repository that is reliable, searchable, accessible from where I work, and that looks good with color-coding. Additionally, I don’t want to pay […]

C# Database Connections and Queries

Create connection string:SqlConnection conn = new SqlConnection(“Data Source=DATASOURCE\\\\SQLEXPRESS;Initial Catalog=DATABASE_NAME;Integrated Security=True”); try { conn.Open(); SqlCommand sql = new SqlCommand(“SELECT * FROM tableName”, conn); SqlDataReader reader = sql.ExecuteReader(); while (reader.Read()) { this.TARGET_ID.InnerHtml += reader[“column”] ; } } catch (SqlException sqle) { sqle.Message.ToString(); }

Silverlight Treeview – Using C#

On your design page: Margin=”76,400,0,328″ Width=”300″> In the C# code: private void populateSchemaTree() { // clear previous contents so they don’t pile up schemaTree.Items.Clear(); TreeViewItem tv = new TreeViewItem(); TreeViewItem tv_sub = new TreeViewItem(); // parent – make a new object for each parent item tv.Header = “Parent”; // child – make a new object […]