Search This Blog

June 29, 2015

Exclude the data of carriage return char (13) in SQL query

Today one test failed in SOAtest. After looking into this one, I noticed that if I invoked one WCF method using the same scenario, it returned the following data in WCF response.

"INSERT\r TEST\r TESET\r \r REASON"

But In SQL server, it showed “INSERT TEST TESET REASON"

That’s because the data contains Carriage Return CHAR (13).

 

If I add Where [ReasonCode] like '%'+char(13)+'%' in SQL query, I can find the data of Carriage Return.

 

If I add Where [ReasonCode] not like '%'+char(13)+'%' in SQL query, I can’t  find the data of Carriage Return.



In order to avoid these kind of data, after adding Where [ReasonCode] not like '%'+char(13)+'%' in SQL query, the test passes all the time.

June 3, 2015

How to transfer data from iPhone 5 to iPhone 6 Plus via iTunes?

I got a used iPhone 6 Plus from my wife. If I would like to transfer data from my iPhone 5 to iPhone 6 Plus, here are the easy steps. I transferred the data successfully.

Reset iPhone 6 Plus.

Use USB to connect to iPhone 5 and Windows 7 laptop. It opens iTunes automatically.

Backup data in iPhone 5 first.

Use USB to connect to iPhone 6 plus and Windows 7 laptop.

Follow the instructions in iPhone 6 Plus and do step by step.

You will see Restore from iTunes backup.

Choose the name of iPhone 5 to restore and it takes about 10-20 minutes to transfer the data.

During the credit card setup in Apple Pay, I was not aware that my credit card in my apple account was expired. The setup was not working.  After I updated the credit card in my apple account, it was not working either because iTunes was not smart and didn’t sync well to iPhone 6 Plus.  I skipped the setup and did it later.

Follow the instruction in iPhone 6 Plus again and finally you will see all data is transferred successfully.