How can I exclude a record from the database from a selection in an E3Browser on the application’s screen?
Solution:
To delete the record, you can use a Query with the following SQL code:
DELETE FROM Table1
WHERE E3TimeStamp = #<%VarTime%>#
The SQL code above works with either SQL Server or Oracle databases.
To select the record, you can use GetColumnValue method in E3Browser’s Click or DbClick events. Example:
Sub E3Browser1_DblClick()
Screen.Item(“Text1”).Value = GetColumnValue(0)
Screen.Item(“Text2”).Value = GetColumnValue(1)
Screen.Item(“Text3”).Value = GetColumnValue(2)
Screen.Item(“Text4”).Value = GetColumnValue(3)
End Sub
To confirm the operation, use a button to execute the Query.
Example: script being executed in a button’s Click event::
Sub CommandButton1_Click()
set query = Screen.Item(“QueryDelete”)
query.SetVariableValue “VarTime”, Screen.Item(“Text1”).Value
query.Execute()
End Sub