Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Server

Status
Not open for further replies.

addsd

Programmer
Joined
Oct 12, 2001
Messages
33
Location
US
Dear All,

Have create a linked server from SQL 2000 to Informix using ODBC data source and it is fine.

The problem is, when I try execute a SELECT statement i.e. 'SELECT mtime,mDate From Table1' it popus with following error message.

'Error converting data type DBTYPE_DBTIMESTAMP to DateTime'

After excluding of 'mTime' from the SELECT statement it works well.The FiledType of mTime in Informix is 'DateTime Hour To Minute'

How can I read that particualr field ?. I tried with Convert using Varchar, DateTime etc... but it doesn't work.

Is it informix Driver problem ?.

Any tips/advise shall higly be appreciated.

Thanks in advance

Regards,
Ahmed


 
Hi ahmed,

I have a similar setup connected to DB2 and some data types will not convert correctly. So what you have is probably normal. The driver is not capable of doing the correct conversion. Check the odbc manual as well as sql books online...

Try converting the datetime field into character field. I do it all the time when doing similar connections into DB2 and Oracle7.3. Check Informix manuals on the proper sql function to use for conversion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top