Home Forums SQL Server 2005 Administering Linker server to AS/400 DB2 - character translation problems RE: Linker server to AS/400 DB2 - character translation problems

  • Not sure if this thread is still active but i would appreciate any help with this - I have connected to an AS400 DB2 server through an SQL Server Linked Server connection. I'm trying this through the IBMDA400 as well as IBMDASQL providers. Through both providers, i have absolutely no issues querying data from a file. However, while "writing to" a file, (i'm assuming this translates to an insert statement into a table), i'm having a tough time executing the insert. "I get the error message Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.". While I could and did use the CONVERT(varbinary, <column/data>) function to convert it to varbinary, the data gets garbled at the other end. When i try to select from the same table, I get values that are also not quite right. For instance, i get the value of 0x40 for a blank/empty space instead of 0x20 (which is CONVERT(varbinary, ' ')). Has anyone faced this issue and has solved it?