Posts

Showing posts from January, 2018

Donate

How To Read XML File Using DataTable.ReadXml() In C#

Image
Good afternoon friends! In this tutorial, I will demonstrate how to read an XML file using DataTable's ReadXml() method. While reading a file using DataSet's ReadXml() method is straightforward, using the DataTable's method might cause run-time or logical bugs. One example is that when using the DataTable's ReadXml() function, the DataTable object does not contain any records or nothing at all given that fact that the method has successfully executed. To proceed, we will read an XML file below called books.xml taken from MSDN page using DataTable's ReadXml() method. <?xml version="1.0" encoding="utf-8" ?> <catalog> <book id= "bk101" > <author> Gambardella, Matthew </author> <title> XML Developer's Guide </title> <genre> Computer </genre> <price> 44.95 </price> <publish_date> 2000-10-01 </publish_date> <description...

Converting Rows To Columns With DateTime Column In SQL Server

Good evening! An issue was brought up by a developer on how to convert rows of DateTime values into columns using MS Access DB with functionality similar to pivoting of MSSQL.The problem has an added complexity since specific portions of the DateTime will be extracted too. See original post here: Converting Columns to Rows in MS Access . The data presented is similar to a Timesheet entry wherein an employee has login/logout records. The solution presented in the thread involves usage of subquery and joins designed for MS Access Db. I modified the accepted answer to a T-SQL query using Group By, Max() function, Coalesce() and without subquery. SELECT LogInfo.fldMachineId, Year (LogInfo.fldLogDate) as [ Year ], Month (LogInfo.fldLogDate) as [ Month ], Day (LogInfo.fldLogDate) as [ Day ], Max (Coalesce( Convert ( varchar ( 5 ), T2.fldLogDate, 108 ), '' )) as TimeIn1, Max (Coalesce( Convert ( varchar ( 5 ), T3.fldLogDate, 108 ), '' )) as TimeOut1, ...

Could not load file or assembly Microsoft.VisualStudio.ConnectedServices Version=2.0.0.0

Image
Hello, This issue happens when closing applications created by Visual Studio 2015 either Console, Winforms or ASP.NET. The resolution for this problem is explained here in detail Visual Studio 2015 Enterprise with Update 1 - Could not load file or assembly Microsoft.VisualStudio.ConnectedServices, Version=2.0.0.0 . Be aware that the ConnectedServices page has several versions and you might install the current package which is incorrect. Since the assembly required is 2.0.0.0, the correct package is in this page Microsoft.VisualStudio.ConnectedServices 2.0.0 .

NuGet Package Manager Missing For Visual Studio 2015 Missing On Fresh Install

In the event that NuGet Package Manager Tool is not found on Visual Studio 2015 Update 1 after fresh install of the software, simply download the VSIX installer from Visual Studio MarketPlace and add it to the IDE. Here's the link of the NuGet Tool: NuGet Package Manager for Visual Studio 2015 . Cheers! :-)

Repeater Web Server Control In ASP.NET Web Forms With Bootstrap And Entity Framework

Image
Happy New Year! This post will illustrate on how to apply Bootstrap styling to a Repeater control given that the template used will be a Table element. To begin with, create an ASP.NET WebForm project. This application will retrieve Employee information from Northwinds database. Add an ADO.NET Entity Framework 6.0 to your project which will hook up with the Employee table. Add a WebForm page to your solution then drag a Repeater control inside the div tag below the form tag. Make sure to reference the bootstrap file in your head tag. The Repeater control will utilize the table element as it's template for displaying employee information. For the record, the employee photo will be shown on the left column, while the personal details are presented on the right column. The table also made use of Bootstrap's table css classes. <head runat= "server" > <title></title> <link href= "Content/bootstrap.css" rel= "stylesheet...

Donate