Click to See Complete Forum and Search --> : Only 1 character inserted into NVarChar field


kangolian
January 23rd, 2003, 07:13 AM
Hi

I've got an ASP.NET page that updates an SQL Server 7 database using an ADO.NET SqlDataAdapter.InsertCommand that calls a stored procedure.

It inserts all values correctly apart from an NVarChar field. On that field it only saves the first character of the value passed to the Stored Proc.

Any ideas why??

I can post the code if you like.

kangolian
January 23rd, 2003, 08:50 AM
Sussed it.

I changed the line in the SP that read:

@booked_by nvarchar

to:

@booked_by nvarchar(30)

30 corresponds to the size of the field in the DB.