Hi,
I'm hoping that somebody can help me with this one?
I've got the following line of code
strSQL = "SELECT DISTINCT n2.Abbreviation FROM Abb AS n1 INNER JOIN Abb AS n2 ON n1.Word = n2.Word WHERE ((n1.Word= '" & ClueBX & "') AND NOT (n1.Abbreviation = n2.Abbreviation) AND (LEN(n2.Abbreviation) = '" & No_Letts & "') AND (n2.Abbreviation Like ('" & pattern & "')));"
but for some reason, it will read in the ClueBX, and the No_Letts but NOT the pattern.
The ClueBX is set to the value of a textarea, and No_Letts is the selected value of a radiobutton list. pattern is meant to be the value of a textbox, where the user can search for a word like the pattern that they've entered.
Would there be any reason that coding wouldn't work? I know that the SQL query works within Access with the LIKE but it doesn't want to work within Visual Studio.net.
Thanks in advance
Jane
I'm hoping that somebody can help me with this one?
I've got the following line of code
strSQL = "SELECT DISTINCT n2.Abbreviation FROM Abb AS n1 INNER JOIN Abb AS n2 ON n1.Word = n2.Word WHERE ((n1.Word= '" & ClueBX & "') AND NOT (n1.Abbreviation = n2.Abbreviation) AND (LEN(n2.Abbreviation) = '" & No_Letts & "') AND (n2.Abbreviation Like ('" & pattern & "')));"
but for some reason, it will read in the ClueBX, and the No_Letts but NOT the pattern.
The ClueBX is set to the value of a textarea, and No_Letts is the selected value of a radiobutton list. pattern is meant to be the value of a textbox, where the user can search for a word like the pattern that they've entered.
Would there be any reason that coding wouldn't work? I know that the SQL query works within Access with the LIKE but it doesn't want to work within Visual Studio.net.
Thanks in advance
Jane