If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Unidata in SQL Server query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-07, 10:12
zarembisty zarembisty is offline
Registered User
 
Join Date: Feb 2007
Posts: 1
Unidata in SQL Server query

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 
*
FROM
OPENROWSET
('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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On