Hello,
I'm trying to access a unidata database (using informix odbc driver) from a sql server stored procedure. I'm using OpenRowset function to get the data. Following is a simple code snippet that is giving me a problem:
Code:
SELECT *
FROMOPENROWSET
('MSDASQL',
'DSN=DSNNAME;Uid=USERID;Pwd=PASSWOD;',
'SELECT
PLAN_STATUS,
REFERENCE,
PART_NBR,
QUANTITY,
VENDOR,
TYPE,
M_BUYER,
DUE_DT,
FROM
ii.PLSEL_NF,
')
The code results in the following error:
Code:
Error converting data type DBTYPE_DBDATE to datetime.
If I remove the DUE_DT from the selection list for OpenRowset it works just fine, but with the DUE_DT the code fails the moment DUE_DT is empty in unidata (which is a valid condition).
I am by no means a Unidata/Informix person so I don't even know where to begin looking for a solution. Any hints would be appreciated.
Thanks,
Marek