I have problem with DP query on _archive.._archive config
i want get all data point filter based on _archive.._archive config
i'm trying the code below but nothing work
main(mapping event)
{
// "System1:_mp_flap.commands.opening:_archive.._archive"
//"System1:f1.commands.opening:_archive.._archive"
dyn_dyn_anytype tab;
int z;
int length;
//trying number 1
dpQuery("SELECT '_original.._value' FROM 'System1:f1.commands.opening' WHERE '_archive.._archive' == 1 ", tab);
//trying number 2
// dpQuery("SELECT '_original.._value' FROM '*.*.*' WHERE '_archive.._archive' == 1 ", tab);
//trying number 2
// dpQuery("SELECT '_original.._value' FROM '*.*' WHERE '_archive.._archive' == 1 ", tab);
length=dynlen(tab);
DebugN("Length:",length);
for(z=1;z
dp query filter based on _archive.._archive config
- hussamshaar
- Posts:2
- Joined: Mon Aug 06, 2018 11:13 am
dp query filter based on _archive.._archive config
- paramesh1985
- Posts:81
- Joined: Thu Sep 25, 2014 6:03 am
Re: dp query filter based on _archive.._archive config
Hi,
WinCC OA will not support the below query as far as i know. You have to use dpGet function to get the "_archive:archive" value.
In General dpquery will support only whichever attributes available in the system management "sql query" tab.
regards,
r.parameshwaran.
WinCC OA will not support the below query as far as i know. You have to use dpGet function to get the "_archive:archive" value.
In General dpquery will support only whichever attributes available in the system management "sql query" tab.
regards,
r.parameshwaran.
- Asem Bani Salameh
- Posts:17
- Joined: Sun Aug 05, 2018 9:43 am
Re: dp query filter based on _archive.._archive config
Hi Hussam,
Archive configs is handled by the database manager (i.e. not with the event manager) ; such that the dpquery cant be used for that purpose.
However I have written the code below that could help you :
main()
{int z;
string list1;
string dp;
dyn_string tab;
dyn_string tab1;
int i=0;
while (i
Archive configs is handled by the database manager (i.e. not with the event manager) ; such that the dpquery cant be used for that purpose.
However I have written the code below that could help you :
main()
{int z;
string list1;
string dp;
dyn_string tab;
dyn_string tab1;
int i=0;
while (i
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: dp query filter based on _archive.._archive config
If you want to read the statistics information for the archive you have to set a dp element to refresh the statistics information.
int i_numVA;
dyn_string ds_filesVA;
dyn_string ds_dpsVA;
dpGet("_ValueArchive_" + i_numVA + ".files.fileName",ds_filesVA);
dpSetWait("_ValueArchive_" + i_numVA + ".statistics.index",dynlen(ds_filesVA));
After (a short delay) you can do the dpGet() to get the elements which have an active archive config and are saved in the particular archive.
dpGet("_ValueArchive_" + i_numVA + ".statistics.dpElements",ds_dpsVA);
Please take into account that this procedure only works when using HDB archiving.
Best Regards
Leopold Knipp
Senior Support Specialist
int i_numVA;
dyn_string ds_filesVA;
dyn_string ds_dpsVA;
dpGet("_ValueArchive_" + i_numVA + ".files.fileName",ds_filesVA);
dpSetWait("_ValueArchive_" + i_numVA + ".statistics.index",dynlen(ds_filesVA));
After (a short delay) you can do the dpGet() to get the elements which have an active archive config and are saved in the particular archive.
dpGet("_ValueArchive_" + i_numVA + ".statistics.dpElements",ds_dpsVA);
Please take into account that this procedure only works when using HDB archiving.
Best Regards
Leopold Knipp
Senior Support Specialist