Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Error converting data type DBTYPE_DBDATE to dateti

Author  Topic 

rwaldron
Posting Yak Master

131 Posts

Posted - 2005-06-29 : 12:22:55
Hi all ..Please help..This has been driving me nuts..
I have a linked server is SQL to a Pervasive DB...

If I run the query
SELECT *
From OPENQUERY(servicebase_live_link, 'SELECT * from contacts')
I get the correct databack as the table contacts just contains Datatypes CHAR.

However when I run the query
SELECT *
From OPENQUERY(servicebase_live_link, 'SELECT * from jobs')
I get the error Error converting data type DBTYPE_DBDATE to datetime.

I know this is because the Table jobs contains datatypes of CHAR,DATE,INTEGER,TIME and to start with I know the date datatype must be casing problems....
I have tried returning just one column (date_booked) and casting certain fields (date_booked) to get around this but none work.
Such as

SELECT *
From OPENQUERY(servicebase_live_link, 'select CAST(date_booked AS DATETIME) from jobs')

Can someone please help me get this to work ...
Do I need to explicitly set all the fields that are set to these datatypes ?

Thx in advance

Ray..

bagha
Starting Member

5 Posts

Posted - 2005-06-29 : 15:27:41
I never worked in Pervasive database.I found the following link which maybe helpful:
http://www.dbforums.com/archive/index.php/t-1045262.html
Go to Top of Page
   

- Advertisement -