I am creating a datagrid with custom SQL in ASP.NET 2008. The SQL works great, however, until I try and filter the results based on a textbox.
If I create the query using the "Configure DataSource" wizard, I am able to reference the textbox in the WHERE clause using .... WHERE (fieldname = ?) and everything works properly. This is all done through the wizard. The challenge is, I want to add customized code to my SQL statement, specifically CASE Statements. When the SQL is created, I am having trouble referencing the textbox now (since this aspect of the wizard cannot be used). See code below: SELECT A.Table_REQUEST_NO, CASE SUBSTR ( A.Table_STATUS , 1 , 1 ) WHEN 'P' THEN 'PROCESSED' WHEN 'I' THEN 'INCOMPLETE' END FROM PREFIX.Table A WHERE (A.Table_REQUEST_NO =123456) I would like A.Table_REQUEST_NO to reference the tb_textbox control on my form. Please note, I am referencing DB2 Tables. I am rather new to the .NET environment so any suggestions would be greatly appreciated! Thank you for your assistance! Brad
