Mittwoch, 21. August 2013

The media family on device '' is incorrectly formed. SQL Server cannot process this media family

If you get this messge, usually you are trying to restore a backup file from a newer version of SQL Server to an older version. (i.e. SQL Server 2012 => SQL Server 2008 R2)

If backup is correct and one is trying to restore on lower version
Error: The media family on device 'C:\test.bak' is incorrectly formed. SQL Server cannot process this media family
If backup is corrupt and either you try to restore on same or lower version
Error: The file on device 'C:\test.bak' is not a valid Microsoft Tape Format backup set.

Solution: SQL server doesn’t support restore from higher to lower version. There is no "downgrade" possible using backup/restore or detach/attach. You'd have to use the Import/Export wizards (scripts) to migrate everything.

Montag, 12. August 2013

COMException: Die NumberFormat-Eigenschaft des Range-Objektes kann nicht Festgelegt werden

The error in english is:
Unable to set the NumberFormat property of the Range Class

Solution:
In Excel you have two Fields:

  • NumberFormat
  • NumberFormatLocal
NumberFormat takes the format always locale invariant in the american standard and NumberFormatLocal expects the format with the locale formatting string.

Out of memory exception when setting an excel chart name

xlChart.Name = "A name";

This property is read-only for chart objects (embedded charts).

Solution:
The charts are "floating" on the page (not sepearate chart sheets), so the "read-only" remark applies and explains why you're getting an error. A seperate "chart only sheet" can have a name via this property.