|
| Hello All
While using VB6, ADO 2.8, and SQL Server 2000 I've come across an odity that
I haven't been able to track an answer down on.
I wonder if anyone here can help
I have a string array called elecrical details and I write an element to a
SQLServer 2000 database i.e.
.AddNew
!RCD_PartNumber = electrical_details(1
5, record)
If I use VARCHAR in the database table and electrical_details(1
5, record) =
"" then a null value is created in the datatable (as I would hope)
If I use NVARCHAR in the database and electrical_details(1
5, record) = ""
then the update fails on a multi step error.
If electrical_details(1
5, record) has any text in then both NVARCHAR and
VARCHAR both work.
in all cases I have the column RCD_PartNumber set to allow NULLS
Obviously I can can catch the length of electrical_details(1
5, record) and
not write that particular column, but I am interested as to why VARCHAR and
NVARCHAR should behave differently
many thanks in advance
Andy
|
|