I have created a table in SQL and have to retrieve the data from a particular ID column at a time. I've created a numeric textbox named 'sno' in ignition dashboard into which i am putting ID no. and I wish to retrieve the data of that id no. into ignition dashboard, but the error is occurring in my code.
IDS = event.source.parent.getComponent('sno').value
query = ("SELECT StudentName, FatherName, DOB, Gender, Course, MobileNumber, EmailID, Address, SubmittedBy FROM Std WHERE ID = IDS")
error is
Traceback (most recent call last):
File "<event:actionPerformed>", line 17, in <module>
java.lang.Exception: java.lang.Exception: Error executing system.db.runQuery(SELECT StudentName, FatherName, DOB, Gender, Course, MobileNumber, EmailID, Address, SubmittedBy FROM Std WHERE ID = IDS, , )
caused by Exception: Error executing system.db.runQuery(SELECT StudentName, FatherName, DOB, Gender, Course, MobileNumber, EmailID, Address, SubmittedBy FROM Std WHERE ID = IDS, , )
caused by GatewayException: Invalid column name 'IDS'.
caused by SQLServerException: Invalid column name 'IDS'.
Ignition v8.1.28 (b2023060110)
Java: Azul Systems, Inc. 11.0.18