Chris Johnson

Chris Johnson

  • NA
  • 41
  • 4.5k

How to populate a Datagridview in Windows Forms

Feb 23 2023 2:11 PM

Hi all.

I have a very simple Windows form. 
This contains one textbox and a Datagridview. This will be using ODBC to an AS400 table which is already set up.
I want to add an SQL where statement where it brings only the record based on the textbox.
I can do this very easily in .Net just not sure how to go about this in Windows forms?

The SQL statement this is what I am trying to create.

SELECT AMFLIB.MOMASTLB.ORDRMY as Order, AMFLIB.MOMASTLB.FITMMY as Item, AMFLIB.ITEMASA.ITDSC as Description
FROM AMFLIB.MOMASTLB INNER JOIN AMFLIB.ITEMASA ON AMFLIB.MOMASTLB.FITMMY = AMFLIB.ITEMASA.ITNBR
WHERE (((AMFLIB.MOMASTLB.ORDRMY)=?))

 


Answers (1)