hello.. i would be greatly grateful if anyone could help me with this.. i have these 2 lines of code with different criterias for different databases under the same function.. can someone teach me how to join them?
Public Function CheckMyQuantity() As DataSet
Dim sqlString As String
Dim adapter As OleDbDataAdapter
Dim leongy As DataSet
'these 2 lines
sqlString = "SELECT StockID,StockName,Quantity from Branch2Stock WHERE Quantity > 100"
sqlString = "SELECT StockID,StockName,Quantity from BranchStock WHERE Quantity < 20"
adapter = New OleDbDataAdapter(sqlString, cn)
leongy = New DataSet
adapter.Fill(leongy)
cn.Close()
Return leongy
End Function
Public Function CheckMyQuantity() As DataSet
Dim sqlString As String
Dim adapter As OleDbDataAdapter
Dim leongy As DataSet
'these 2 lines
sqlString = "SELECT StockID,StockName,Quantity from Branch2Stock WHERE Quantity > 100"
sqlString = "SELECT StockID,StockName,Quantity from BranchStock WHERE Quantity < 20"
adapter = New OleDbDataAdapter(sqlString, cn)
leongy = New DataSet
adapter.Fill(leongy)
cn.Close()
Return leongy
End Function