Help using Base SAS procedures

Pass Through iHistorian SQL Error

Reply
New Contributor
Posts: 2

Pass Through iHistorian SQL Error

I'm trying to use a pass through to use iHistorian to access data I need. The code is listed at the bottom. I'm recieving the following error. 

 

ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot initialize the data source object of OLE DB
provider "IhOLEDB.iHistorian" for linked server "fsp1".

 

Has anyone tried this with iHistorian? Does anyone know what's going on here?

----------------------------------------------------------------
proc sql;
connect to odbc as conn(dsn="FSPPDW" uid=FontaneF);
create table work.Stuff as
select * from connection to conn (
select * from OPENQUERY(fsp1,


'SELECT
tagname,
timestamp,
value as Signal

FROM ihrawdata
WHERE timestamp > 10/23/2015 AND timestamp < 10/25/2015
AND (tagname = Fsdfeee:000)
AND intervalmilliseconds = 60000
AND samplingmode=interpolated'

)
);
disconnect from conn;
;
quit;

Super User
Posts: 5,431

Re: Pass Through iHistorian SQL Error

Posted in reply to alewis3663

Have you tried to reach it from another (non SAS ) application?

Data never sleeps
New Contributor
Posts: 2

Re: Pass Through iHistorian SQL Error

I accessed the data through iHistorian Interactive SQL and it works. I have not tried it from another software. I'm only really familar with SAS and JMP, and most of my data processing is through SAS, so I would prefer to not incorporate a 3rd software.

Super User
Posts: 3,256

Re: Pass Through iHistorian SQL Error

Posted in reply to alewis3663

One obvious problem in your SAS log is that you are using SAS/ACCESS to ODBC but the database driver error references OLEDB. So what type of database driver are you using with iHistorian - OLEDB or ODBC? You can only use an ODBC driver with SAS/ACCESS to ODBC. 

Super User
Posts: 5,431

Re: Pass Through iHistorian SQL Error

Posted in reply to alewis3663
You should for trouble shooting purposes. Just try to open your source in Excel or any other OLE db/odbc client.
Data never sleeps
Ask a Question
Discussion stats
  • 4 replies
  • 540 views
  • 0 likes
  • 3 in conversation