Search This Blog

September 27, 2013

Fixed the issue in Oracle SQL Developer - The program can’t start because MSVCR71.dll is missing from your computer

I am working on another project and haven’t touched Oracle SQL Developer for some months. Today when I double clicked sqldeveloper.exe and tried to open it, it showed the following error:

The program can’t start because MSVCR71.dll is missing from your computer. Try reinstalling the program to fix this problem.

After looking into this issue, it is easy to fix it.

Go to Registry Key (regedit)

Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ sqldeveloper.exe

If you don’t see sqldeveloper.exe, create a new key.

Create a new string and then point to the file location - C:\RayLin\sqldeveloper-\sqldeveloper\jdk\jre\bin

Double click sqldeveloper.exe again and you are all set.

September 20, 2013

WCF properties are not accessible at compiler time via C# dynamic type

Today I create a simple unit test to get some values from the table in SQL Server 2008 R2. This time I would like to use dynamic type in the code because the values from the table have different data types (int, string, and double). I don’t want to do casting and type conversion.

The interesting part is that when using dynamic type, WCF properties are not accessible, but when using var, they are accessible. That’s because with dynamic, it doesn’t know anything about properties at compiler time. It only knows them at run time.

If I would like to access properties directly, using var is a good idea, but it requires casting and type conversion.

If I don’t like to do casting and type conversion, using dynamic is a good idea, but properties are not accessible. I need to memorize the property names. That’s the trade-off.

Using dynamic is not useful in this unit test.

September 13, 2013

SQL Query: Transpose Columns to Rows via UNPIVOT

In this sprint, we have new features and I need to validate the data accuracy in our Silverlight Application and some related tables in SQL Server 2008 R2.

A table has 300+ columns

B table has 200+ columns.

The new features of Silverlight application are still in Development and automation is not possible at this moment.

If I would like to validate data accuracy in many columns in the tables, after running SQL query via SSMS, I need to use the scrollbar at the bottom to switch to the right to take a look at the values gradually. That’s not efficient.

One efficient way is to use “copy with headers” to copy the headers & values and past the data into the Excel Spreadsheet. After that, I can compare the values between Silverlight UI and the spreadsheet quickly after using transpose function in Excel. If I can transpose columns to rows in SQL query directly, that’s great too.

The following one is the simple SQL query for me to transpose columns to rows easily via UNPIVOT.

See Also

A basic SQL query to validate the distance via two Latitude / Longitude Points

Windows Update Bug about DPI Setting

We have a 55 inch TV that connects to HDMI desktop computer at home. My wife likes to install some TV software to watch TV programs. In order to make the text size larger in those software, she sets DPI = 200%.

However, every time after doing Windows Update and making the computer reboot, the text size becomes so small, but DPI is still 200 %. In the beginning, we thought it was the issue on TV software. After spending some time looking into this issue, she is so smart that she can fix the issue by herself.

Set DPI =100%, click OK and then set DPI=200% again. The text size becomes larger and everything is back to normal.

She talks to me often that she doesn't like Windows Update on this HDMI desktop computer because she needs to reset DPI setting every time. That’s not user-friendly. Who will know it is the issue in DPI setting? I totally agree.

September 6, 2013

The Useful Diagram of TFS 2010 Upgrade Path

Our team is working on the upgrade from TFS 2010 to TFS 2012. However, our team members were confused about VSTS and TFS per our conversation.

Some said we use VSTS 2010 to develop the current project, but will use VSTS 2012 to develop another project. Therefore, the best way is to upgrade from TFS 2010 to TFS 2012.

To clarify their confusion, I spent some time drawing the diagram of our TFS upgrade path via one note. After our team conversation and this diagram, we are on the same page.

See Also

Unit tests in VSTS 2012 update 3 can be still executed successfully via mstest in TFS 2010 build server

September 4, 2013

Unit tests in VSTS 2012 update 3 can be still executed successfully via mstest in TFS 2010 build server.

Everyone knows that we can’t run all tests via Test List Editor because it is deprecated in VSTS 2012. Test Explorer is new to VSTS 2012, but coded web tests are not supported in Test Explorer (Please see the post of VSTS 2012 IDE update 3 can’t run multiple Coded Wed Performance Tests at a time [only MSTEST Matters])

In our current environment (TFS 2010 Server, TFS 2010 Build Server, TFS 2010 Build Process template), can all tests (WCF tests, DB tests, Coded web tests) after the upgrade to VSTS 2012 be still executed successfully via mstest in TFS 2010 Build Server? Therefore, I would like to try the following basic scenario: 

·         Back up the current VSTS 2010 unit tests (WCF tests, DB tests, Coded web tests) 

·         Upgrade all tests from VSTS 2010 to VSTS 2012 update 3. 

·         After the upgrade, create a new folder in TFS 2010 source control and check in VSTS 2012 code. 

·         Clone a new TFS 2010 build definition from the current one and all configuration will remain the same. 

·         Edit the new TFS 2010 Build Definition for VSTS 2012 code

      --In Workspace, change the working folder to TFS 2012 code
      --In Process, still use TFS 2010 Build process template.
      --In Process, Items to Build and Automated Tests point to the new TFS 2012  Solution file
      --In Process, Test Metadata file will point to VSTS 2012 code

·         Save the build definition 

·         Push a new build

After pushing a new build, all tests in VSTS 2012 Update 3 can be still executed successfully via mstest in TFS 2010 build Server. 

September 3, 2013

TFS 2012 Clone Build Definition

My manager talked to us that he is using another server to upgrade TFS 2010 to TFS 2012 team project where people can use VSTS 2010 or VSTS 2012 team explorer to connect. 

Currently I have VSTS 2010 & 2012 (side by side install) in my laptop. When I use VSTS 2012 to connect to TFS 2012 team project and try to clone a new build definition, I don’t see “Clone Build Definition” function (Please see a post of  TFS 2010 Clone Build Definition)

I don’t feel surprised because I only installed TFS powerful tools 2011 for TFS 2010, which is not supported in TFS 2012.

After I install Visual Studio Team Foundation Server 2012 Update 2 Power Tools, Clone Build Definition appears.

Fixed the issue: HTTP Code 404 not found when connecting to TFS 2010 Team Project via VSTS 2012

After the Labor Day long weekend, I am back to work today. When I used my VSTS 2012 to connect to TFS 2010 Team Project, I got the following error, but it was working last week.

After looking into this issue, I deleted all files in the following folder and everything is back to normal.

C:\Users\username\AppData\Local\Microsoft\Team Foundation\4.0\Cache