Wierd Problem

Results 1 to 2 of 2

Thread: Wierd Problem

  1. #1
    Join Date
    Dec 1969

    Default Wierd Problem

    I&#039;m Using Visual InterDev to make things faster, but for a grid and a RS, I&#039;m using the SQL Statement of:<BR><BR>Industry = Request.Form("Industry")<BR>Industry = Replace(Industry, ", ", "&#039;,&#039;")<BR>Location = Request.Form("Location")<BR>Location = Replace(Location, ", ", "&#039;,&#039;")<BR><BR>SELECT JobID, CompanyID, City, State, W2, Duration FROM Job WHERE Location IN (&#039;"&Location&"&#039;) AND Industry IN (&#039;"&Industry&"&#039;)<BR><BR>And when I select multiple locations or industries from the form page, I get no results. If I set the RS for just the table, or to get the selected fields from the table with no restrictions, I get all the records, no problem. What am I doing wrong?? This has only started happening using VI6 & SQL Server, migrating from a FP & UltraDev & Access DB.

  2. #2
    Join Date
    Dec 1969

    Default Remember? DEBUG DEBUG DEBUG...

    Do a RESPONSE.WRITE of the SQL that you passing in.<BR><BR>And then *do* check to be sure there really *is* some data that matches the query.<BR><BR>For example, if the query shows <BR>...WHERE Location IN (&#039;MT&#039;,&#039;ND&#039;) AND Industry IN (&#039;Fashion&#039;,&#039;HiTech&#039;) ...<BR><BR>are there *really* any Fasion or HiTech industries in your DB that are *also* in Montana or North Dakota? (Using made up examples, of course.)<BR><BR>???<BR><BR>And did you try exactly that query in the SQL Server query tool?<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts