dbTalk Databases Forums  

Unexpected NULL value - Linked Server AS400 DB2

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Unexpected NULL value - Linked Server AS400 DB2 in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mike
 
Posts: n/a

Default Unexpected NULL value - Linked Server AS400 DB2 - 09-18-2003 , 12:02 PM






Greetings,

We have been Selecting data from A DB2 AS400 via Linked
Servers in SQL 7.

We began to pull data from new intstance/tables that
contain some fields with foreign characters. (double byte,
unicode) Some data will pull fine, then we will get an
error:

Unexpected NULL value returned for
column '[MYLINKEDSERVER].[DB2NAME1].[DB2NAME2].
[MYTABLENAME].DESC2' from the OLE DB provider 'MSDASQL'.
This column cannot be NULL.

The DBA from the other country tells me that the field is
never null.

KB article Q239458 seemed related but doesn't help. We are
running SP4, and will be trying on SP3 soon.

Is there any way to turn off this checking for NULL? My
guess is that it interprets the unicode as a NULL
incorrectly. I've tried to explicitly cast into varchar
(30.)

Sometimes this fields is readable in English and it
contains data that is critical when we can see it.

Thanks In Advance

Reply With Quote
  #2  
Old   
Mike
 
Posts: n/a

Default Unexpected NULL value - Linked Server AS400 DB2 - 09-19-2003 , 09:36 AM






Our work-around was to use a pass-thru query to DB2 that
used NULLIF functions on the fields that failed.

That prevented the OLE-DB from dying because of a
perceived NULL / NOT NULL compatibility issue.

Mike

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.