Error Message:
Msg 8152, Level 16, State 14, Line 5
String or binary data would be truncated.
Severity level:
16.
Description:
This error message appears when you try to insert a string with more characters than the column can maximal accommodate.
Friday, February 19, 2010
Saturday, February 13, 2010
DbProviderFactory Class
If you know you're going to need an SqlConnection always and forever in your code, there's no advantage at all. But what if you want your code to be able to use either an SqlConnection, or an OracleConnection? Then you want to use a DBProviderFactory to let the code determine which connection to use, rather than hardcoding in some sort of switching logic.
Reference: http://msdn2.microsoft.com/en-us/library/wda6c36e.aspx
The System.Data.Common namespace provides classes for creating DbProviderFactory instances to work with specific databases. When you create a DbProviderFactory instance, passing it information about the provider along with the connection string, the instance can determine the correct strongly-typed object to return based on the information it has been provided. This lets you write code that is not dependent on the data provider and lets you choose the provider at runtime.
Reference: http://msdn2.microsoft.com/en-us/library/wda6c36e.aspx
The System.Data.Common namespace provides classes for creating DbProviderFactory instances to work with specific databases. When you create a DbProviderFactory instance, passing it information about the provider along with the connection string, the instance can determine the correct strongly-typed object to return based on the information it has been provided. This lets you write code that is not dependent on the data provider and lets you choose the provider at runtime.
Monday, February 1, 2010
Exceptions
System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
The best solution for this porblem is
1. Inside IIS (7) click on Application Pools.
2. Find the Application Pool that is configured for your web application in the list.
3. Select it, then click Advanced Settings on the right.
4. Second setting in the list: Enable 32-Bit Applications - must be set to True.
The best solution for this porblem is
1. Inside IIS (7) click on Application Pools.
2. Find the Application Pool that is configured for your web application in the list.
3. Select it, then click Advanced Settings on the right.
4. Second setting in the list: Enable 32-Bit Applications - must be set to True.
Subscribe to:
Posts (Atom)