title: VB LINQ query Where clause * not working?
body: <p>Here is a function I've setup with my query trying to retrieve specific information that a user may or may not enter into a couple text boxes. The user can put in a...</p>
  
  <ul>
  <li>company name </li>
  <li>clients first name</li>
  <li>techs first name</li>
  </ul>
  
  <p>What I want is if the user does not put in anything in the textbox that the query will returns all fields like "*" I believe is what LINQ uses and SQL uses "%". I've tried both and cant figure out why I cant retrieve a certain company with all clients and all techs.</p>
  
  <pre><code>    Public Function SpecificQueryInvoices(ByVal Company As String, ByVal Clientname As String, ByVal techname As String)
  
      Dim specificQuerySetInformation = From invo In database.Invoices
                                Join orgs In database.Organizations
                                On orgs.OrgId Equals invo.OrgId
                                Join clien In database.Clients
                                On clien.ClientId Equals invo.ClientId
                                Join tec In database.Teches
                                On tec.TechId Equals invo.TechId
                                Order By invo.InvoiceId
                                Where orgs.OrgName.StartsWith(Company) And clien.FirstName.StartsWith(Clientname) And tec.FirstName.StartsWith(techname)
                                Select New With {.Company = orgs.OrgName, .Client = clien.FirstName, _
                                                 .Tech = tec.FirstName, invo.Date, _
                                invo.Notes, invo.Parts, invo.Labor, invo.Mileage, invo.TotalCost, _
                                invo.InvoiceNumber}
  
  
      Return specificQuerySetInformation
  
  End Function
  
      Private Sub btnFilter_Click(sender As System.Object, e As System.EventArgs) Handles btnFilter.Click
  
      Dim companyName As String
      Dim ClientFirstName As String
      Dim TechFirstName As String
  
  
  
      If txtCompany.Text = "" Then
          companyName = "*"
      Else
          companyName = txtCompany.Text
      End If
  
      If txtClientName.Text = "" Then
          ClientFirstName = "*"
      Else
          ClientFirstName = txtClientName.Text
      End If
  
      If txtTechName.Text = "" Then
          TechFirstName = "*"
      Else
          TechFirstName = txtTechName.Text
      End If
  
  
      DataGridView2.DataSource = SpecificQueryInvoices(companyName, ClientFirstName, TechFirstName)
  
  
      MsgBox("Filter requested")
  End Sub
  </code></pre>