1

Resolved

"Value cannot be null" error when not using reporting (-R option)

description

When I launch the ExpressMaint command-line utility 1.5.0.0 without using the reporting option (-R) it will throw a "Value cannot be null" error for every database it is trying to backup. The backup will finish correctly though. The workaround is to specify the -R, -RV and -RU parameters and simply use the reporting option.
 
Here's an example call for a system with 2 user databases:
ExpressMaint -S (local)\SQLEXPRESS -D ALL_USER -T DB -B C:\Rado\Backup\SQL2005\ -BU WEEKS -BV 1
 
Here's the output this generates:
Value cannot be null.
Parameter name: path
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at ExpressMaint.ExpressMaint.WriteToFile(String content, String path)
Value cannot be null.
Parameter name: path
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at ExpressMaint.ExpressMaint.WriteToFile(String content, String path)

comments

jaspersmith wrote Nov 3, 2008 at 10:48 AM

This is indeed a bug. There is a direct call to WriteToFile where there shouldn't be. I am in the process of a complete rewrite so the workaround at the moment will be to specify the report parameteres. Thanks for reporting this.

jaspersmith wrote Nov 4, 2008 at 10:36 AM

Fixed in v1.6.0.0