ok, i have a problem with a SQL command.

I have created a table in my database called netfile with three column, user, pass, dir.

When i run

the command:

SELECT dir FROM netfile WHERE user='core33' AND pass='test33'

Nothing happens

when i run;

SELECT dir FROM netfile WHERE pass='test33'

It returns correctly

when i run;

SELECT dir FROM netfile WHERE user='core33'

Nothing Happens.


Can someone look through this code and see why when i search for a record by the USER column it doesn't detect it but where i search via the PASS column it finds it???


-----------------------------------------

All the columns are 50,CHAR in the database


VB Code:
  1. <%@ Page Language = "VB" Trace = "true" %>
  2. <%@ import Namespace="System.IO" %>
  3. <%@ import Namespace="System.Data.SqlClient" %>
  4.  
  5. <Script Runat="server">
  6.  
  7.     Function Scriptname as string
  8.         Dim strURL,aryURL
  9.         strURL = Request.ServerVariables("SCRIPT_NAME")
  10.         aryURL = Split(strURL, "/", -1, 1)
  11.         Scriptname = (aryURL(ubound(aryURL)))
  12.     End Function
  13.  
  14.  
  15.         Sub Page_Load
  16. 'DB stuff
  17.  
  18.         Dim SQLcon As SqlConnection, SQLcmd as SqlCommand, SQLread as SqlDataReader
  19.  
  20.         SQLcon = New SqlConnection ( "Server=xxx.mysite4now.com;uid=xxx;pwd=xxx;database=xxx")
  21.  
  22.         SQLcon.Open()
  23.  
  24.         SQLcmd = New SqlCommand( "SELECT dir FROM NetFile WHERE user='core33' AND pass='test112'", SQLcon )
  25.  
  26.         SQLread = SQLcmd.ExecuteReader()
  27.  
  28.         While SQLread.Read()
  29.  
  30.             Response.Write( SQLRead( "dir" ) )
  31.  
  32.         End While
  33.  
  34.         SQLread.Close()
  35.  
  36.         SQLcon.Close()
  37.        
  38.         End Sub
  39.  
  40. </script>