From: Dustin on
Can I add a PI server as a data source in the Visual Query Builder? How do I do this. I do not see an option to use "PI OLE DB Provider".
From: Dustin on
"Dustin " <dbrisset(a)gmail.com> wrote in message <i39r19$jjt$1(a)fred.mathworks.com>...
> Can I add a PI server as a data source in the Visual Query Builder? How do I do this. I do not see an option to use "PI OLE DB Provider".

What I mean to ask is does Visual Query Builder support OLE databases? I would like to try to use the toolbox to help me learn to build more efficient queries. Currently i can connect to the server using commands along the effect of...

%Connection String
cnstr = strcat('Provider=PI OLE DB Provider;Data Source=',Server,';Persist Security Info=False;User ID=PIUser');

%create activeX control
cn = actxserver('ADODB.Connection');
set(cn,'CursorLocation',3);

%Open connection
invoke(cn,'Open', cnstr);

sql = strcat('SELECT tag, time, value FROM piarchive..piinterp2 WHERE tag = ''', ...
Tag,''' AND time BETWEEN ''',StartTime,''' AND ''', EndTime,''' AND timestep=''',Interval,'''');

% Run query and return results
%open recordset and run query
invoke(cn,'BeginTrans');
try
r = invoke(cn,'Execute',sql.WindSpeed);
invoke(cn,'CommitTrans');
sclSuccess = 1;
catch

etc...