Sunday, August 2, 2020

Problem

Image not saving / updating / uploading properly in Oracle Database using Entity Framework / EF Core in BLOB / CLOB field using Oracle.EntityFrameworkCore provider.


Solution

Oracle BLOB / CLOB has by-default restriction of 2000 bytes in Oracle.EntitiyFrameworkCore provider. Due to this reason it trims the larger image bytes array to 2000 bytes and store in database without giving any error. As a result image not appear properly when retrieved.

To overcome this issue, an attribute is provided by Entity Framework which increases its capability of accepting large sized images. MaxSize attribute is available in Data Annotations assembly which helps to solve this problem.

Hope your problem is solved. Happy Coding!!!

Tuesday, July 7, 2020

Crystal Reports for VS 2010 and .Net 4 framework : "Load Report Failed" error

Problem:
If you have recently upgraded your project and started using Crystal Reports for VS 2010 and .Net 4 framework in your project, you might seen this error randomly or continuously after generating some reports. 

Cause:
Unlike previous versions of Crystal Reports, Crystal Report Engine is not releasing memory after closing reports. 

Solution:
After getting tired of this error, I started diagnosing this issue. I monitored the memory usage and found that memory usage is getting increased even after closing down the reports. So I added some code to restore memory after closing. Here is the addition to my code that solved my problem:


            rpt.Close()
            rpt.Dispose()
            rpt = Nothing
            GC.Collect()


Hope it will solve your problem. Enjoy Coding!

Friday, March 6, 2020

The DataColumnMapping.SourceColumn is required to be unique. 'ColumnName' already exists in the collection.

Problem:

While configuring Table Adapter query in ADO.Net Dataset, you may have received this error:

 The DataColumnMapping.SourceColumn is required to be unique. 'Column' already exists in the collection


Solution:

Open the Dataset's xsd file with XML text editor. Search for the column name showing in the error. Manually remove the mapping column and then save the xml file.

Hopefully you will have no error from now on.

Friday, March 22, 2019

Add-Migration : The term 'Add-Migration' is not recognized as the name of a cmdlet...

Problem


Add-Migration : The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Solution



  1. Open Menu Nuget Package Manager > Manage Nuget Packages for Solution
  2. If you are using EFCore then, Browse Package Microsoft.EntityFrameworkCore.Tools
  3. If you are using EntityFramework then, Browse Package Microsoft.EntityFramework.Tools
  4. Instal the Package
  5. Run the command again : add-migration initial
Hope your problem will be solved.



Tuesday, September 4, 2018

VirtualBox Error during Installation: Failed to retreive the preconfiguration file.

Problem:

While Installing Raspberry Pi over VirtualBox, you may encounter the following error:
Load debconf preconfiguration file.
The file needed for preconfiguration could not be retreived from....blah, blah, blah... The installation will proceed in non-automated mode.




Solution:

The installation file (Disk image) might be corrupt. Re-download the image from the official site, hopefully your problem will be resolved.

I would love to hear from you. Happy coding!

Wednesday, January 10, 2018

ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified 00604. 00000

Problem:


While connecting to an Oracle database with SQL Developer or JDeveloper, you might got this error:

Error:

An error was encountered performing the requested operation:
ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified 00604. 00000 -  "error occurred at recursive SQL level %s"

*Cause:    An error occurred while processing a recursive SQL statement            (a statement applying to internal dictionary tables).

*Action:   If the situation described in the next error on the stack            can be corrected, do so; otherwise contact Oracle Support. Vendor code 604

Solution:


The solution for this problem is simple, but I had to go through a number of websites to find its solution. So here it is:

1. If you are using SQL Developer:
Goto SQL Developer directory and there will be another SQL Developer directory, open it. Open bin folder, and you will find sqldeveloper.conf file in it.

Add 2 entries in sqldevelper.conf file:

AddVMOption -Duser.language=en
AddVMOption -Duser.region=US

Save the file and reopen SQL developer application, connect the database. Hope it will resolve your problem.

2. For JDeveloper, you have to perform the same procedure as described in (1), but in jdev.conf file.

Friday, May 12, 2017

Windows Update not working on newly installed Windows system.

Hi All,

You may experience this type of problem, where windows update was not working. You can follow below steps to ensure everything is correct and on its way.

1. First of all, check all Services related to Windows Update, like Windows Update Service, Cryptographic, BITS etc, are running.

2. Secondly, make sure your internet is properly working and you are able to browse windows update website in your browser. (http://www.update.microsoft.com/windowsupdate/)

3. Make sure you have installed all the latest drivers on your PC/Laptop, especially Operating System enhancements drivers, etc. This is an important step because it can prevent Windows Update from downloading updates.

4. Check the Software Distribution folder, whether it has the downloaded updates. The folder must be present in Windows directory.

5. If the downloaded updates are there, then check the Update History, available in Windows Update form.

6. Also check the WindowsUpdate.log file in Windows directory for errors. If there is an error in the log, try to search this error on the internet.

7. If log error shows error code : 8009017, then go to this microsoft page and reset Windows Update components by following the steps written there.

I hope this post will help you resolve the Windows Update problems. Must tell me the results by commenting on the blog.

Have a nice day.

God Bless.

Popular Posts