Hey so my problem might be really simple or im just going about it all wrong.
So im coding a program that views information from a table, i have code that searchs for a record in the table and then displays the value, but if it cant find that record it will add it in the the table.
Now im, having trouble with the very first time it trys to look for the record it cant find it as its not in the table so i get BOF() error but in the code when it get to BOF() i tell it to add a record for the file its looking for.
So what im trying to ask is there a way to supprese this error? so it doesnt try to go to debugger.
Fild and BOF code -
SET REPROCESS to -1
SELECT "epamonitor23"
GO BOTTOM
findfile1 = "PLC20.P2_5_BF1_HOURS_FLAG_X_1"
DO WHILE ALLTRIM(tagname) != findfile1
SKIP -1
IF BOF()
MESSAGEBOX("ADDED")
INSERT INTO epamonitor2;
(tag,;
stamp,;
value1,;
value2,;
count1,;
count2,;
tagname,;
type,;
taggroup);
VALUES ;
(10,;
DATETIME(),;
1,;
0,;
-1,;
-1,;
("PLC20.P2_5_BF1_HOURS_FLAG_X_1"),;
0,;
("EPA_Dlog"));
ENDIF
ENDDO
SET REPROCESS to 1
So im coding a program that views information from a table, i have code that searchs for a record in the table and then displays the value, but if it cant find that record it will add it in the the table.
Now im, having trouble with the very first time it trys to look for the record it cant find it as its not in the table so i get BOF() error but in the code when it get to BOF() i tell it to add a record for the file its looking for.
So what im trying to ask is there a way to supprese this error? so it doesnt try to go to debugger.
Fild and BOF code -
SET REPROCESS to -1
SELECT "epamonitor23"
GO BOTTOM
findfile1 = "PLC20.P2_5_BF1_HOURS_FLAG_X_1"
DO WHILE ALLTRIM(tagname) != findfile1
SKIP -1
IF BOF()
MESSAGEBOX("ADDED")
INSERT INTO epamonitor2;
(tag,;
stamp,;
value1,;
value2,;
count1,;
count2,;
tagname,;
type,;
taggroup);
VALUES ;
(10,;
DATETIME(),;
1,;
0,;
-1,;
-1,;
("PLC20.P2_5_BF1_HOURS_FLAG_X_1"),;
0,;
("EPA_Dlog"));
ENDIF
ENDDO
SET REPROCESS to 1