SQL Packager

Latest version: 6.4

SQL Packager

Knowledge Base

"Value cannot be null" error creating data script

Category: Troubleshooting & error messages
Date: 23 Mar 2009
Product: SQL Packager
When creating a new database package, SQL Packager may return the following error during the creation of the data script:
"Value cannot be null. Parameter name: format"

SQL Packager attempts to create a script to populate a new table, but if the table contains a column with a Binary Large Object (BLOB) datatype such as image or text, the scripting process fails because it has no index to use as the basis for the query to insert the BLOB data. If a unique index or primary key is created for the table, the scripting process will succeed. To work around this issue, therefore, you could create a primary key or unique index on the table, or exclude the table from the list of tables whose data you want to script.

If more than one of these columns exists, you may identify it using the following (SQL Server 2005 and up) query:

SELECT NAME, object_id FROM sys.objects WHERE TYPE='U' AND OBJECT_ID IN (
SELECT object_id FROM sys.indexes WHERE TYPE = 0
AND OBJECT_ID NOT IN (SELECT object_id FROM sys.indexes WHERE TYPE <> 0 OR is_unique= 1))
and OBJECT_ID in (select OBJECT_ID from sys.columns where system_type_id in (35, 165, 99, 34, 173))

Document ID: KB200903000373 Keywords: SQL, Packager,parameter,format

Was this article helpful?

Search support
Forums
Visit the SQL Packager forum.

SQL Packager

all SQL products

all products