Wednesday, February 25, 2009

Data Type and it's Danger

I was working in a finance application. Recently we discovered the simple mistakes done the datatype and its dangerous implications.

1. Temp table column data type
We had a report SP which has temp tables. The data type of temp tables are set exactly matching to the base column. But when the report is executed it gets the consolidate values, so the data lost is happening.

2. GUID
In the latest stage of the project we have change the data from INT to GUID, which lead to break the existing codes. We need to have a special consideration for GUID data type.

3. VARCHAR
When declaring the VARCHAR it is mandate to specify size of the VARCHAR other it will be defaulted to 1 and data lost will happen.

4. NVARCHAR
Whenever you data has multi language characters we must use NVARCHAR, if you use VARCHAR the charters are set o ?.

No comments:

Post a Comment

Teams PowerShell

 The PowerShell helps to get quick meta data around Teams. Install-Module -Name MicrosoftTeams Connect-MicrosoftTeams Get-TeamAllChannel...