UPDATE MyTable SET Content = 'Hello World!' WHERE [Id] = @AgId
After that I'm reading that field in that row from a C++ program using OLEDB. The problem is that from this program I read garbage after the string, something like: Hello World!>>es
But if I do the following from Query Analizer:
DECLARE @p VARCHAR(255)
DECLARE @q VARBINARY(255)
SELECT @q=Content FROM MyTable WHERE [Id] = @AgId
without the garbage.
Anybody knows why is this happening and/or how can I fix it?