EDN Admin
Well-known member
Im creating an application using Visual Basic in Visual Studio 2010.
Using the TableAdapter there is a connection to a table in an Access database.
Private Sub EMTable_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.SummaryTableAdapter.Fill(Me.EMDataSet.Summary)
End Sub
Using Query Builder I can specify the search criteria such as:
WHERE (FlQty = 6) AND (FlD > 1 AND FlD < 2)
The table appears populated according to the hard coded query search criteria
HOWEVER what I need is to set the search criteria based on user selections on a form prior to calling the table.
EMS.FlQty
EMS.FlDmin
EMS.FlDmax
are Public variables in a Structure and I want to use them on the SQL line like this:
WHERE (FlQty = EMS.FlQty) AND (FlD >= EMS.FlDmin AND FlD <= EMS.FlDmax)
Using the variable names from the vb.net side does not work. I havent been able to figure out how to pass the values to SQL when the call is made to the table.
How do I get the values from my forms in vb.net to be recognized in the SQL code?
View the full article
Using the TableAdapter there is a connection to a table in an Access database.
Private Sub EMTable_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.SummaryTableAdapter.Fill(Me.EMDataSet.Summary)
End Sub
Using Query Builder I can specify the search criteria such as:
WHERE (FlQty = 6) AND (FlD > 1 AND FlD < 2)
The table appears populated according to the hard coded query search criteria
HOWEVER what I need is to set the search criteria based on user selections on a form prior to calling the table.
EMS.FlQty
EMS.FlDmin
EMS.FlDmax
are Public variables in a Structure and I want to use them on the SQL line like this:
WHERE (FlQty = EMS.FlQty) AND (FlD >= EMS.FlDmin AND FlD <= EMS.FlDmax)
Using the variable names from the vb.net side does not work. I havent been able to figure out how to pass the values to SQL when the call is made to the table.
How do I get the values from my forms in vb.net to be recognized in the SQL code?
View the full article