S
Smallweed
I have some stored procedures in a SQL Server 2005 database to which I pass
Excel data by way of VBA. These sprocs have parameters, some of which are
expecting strings from cells in text-type columns in Excel - these are then
passed to database fields of type varchar or nvarchar. This code currently
falls over if one of these cells has nothing in it. Does anyone know of a
way in Excel/VBA that I can pass nulls successfully to text fields in SQL
Server? Perhaps some VBA constant I haven't heard of.
(I know I can deal with it in the stored procedures by setting defaults of
null and then using If conditions but this seems unnecessarily
overcomplicated.)
Excel data by way of VBA. These sprocs have parameters, some of which are
expecting strings from cells in text-type columns in Excel - these are then
passed to database fields of type varchar or nvarchar. This code currently
falls over if one of these cells has nothing in it. Does anyone know of a
way in Excel/VBA that I can pass nulls successfully to text fields in SQL
Server? Perhaps some VBA constant I haven't heard of.
(I know I can deal with it in the stored procedures by setting defaults of
null and then using If conditions but this seems unnecessarily
overcomplicated.)