title: vb6 displaying problem
body: <p>i have created a database in mysql5.0. i want to display the data from it. it has table named login. it has 2 columns username and password. in form i have 2 text fields username and password i just want to validate input with database values and display message box. connection from vb to database is established successfully. but its not validating input. its giving error as 'object required'. please any body help i'm new to vb.</p>
  
  <p>i'm using vb6 and mysql5.0
  thank you</p>
  
  <p>code is:</p>
  
  <pre><code>public con As ADOB.connection
  public rs2 As new ADOB.Recordest
  
  public sub preconnection()
      set con = New connection
      set rs = New recordest
      set con = New ADOB.connection
      con.connectionString = "DRIVER = {Mysql ODBC 3.51 driver};"_
                   &amp; "SERVER = localhost;"_
                   &amp; "DATABASE = vbtest;"_
                   &amp; "UID = root;"_
                   &amp; "PWD = ;"
      con.cursorLocation = 
      con.open
  end sub
  
  sql = "select *from login"
  set rs = con.execute (sql)
  if rs.BOF = False Then
      While Not rs.EOF
          If Ucase(txtlogin.text = trim(rs(0)) Ad txtpassword.text = Trim(rs(1)) Then
              username = rs(0)
              loginname = True
  
              MsgBox("welcome")
          End if
          rs.movenext
       wend
  End Sub
  </code></pre>