title: Events used for login window in power builder 10.0
body: <p>I have a login window for entering into my application, here I inserted a table named login1 and have two columns as <code>"username"</code> and <code>"password"</code> . I included the events for make "logging in" bye two cases 1) a command button 2) Enter key. So I Used to write these following code in button cliked event and a user event  that trigger the keydown of "Enter!" key.</p>
  
  <pre><code>if KeyDown(KeyEnter!) THEN   //In User Event case only
  string ls_unm;
  string ls_pass,ls_field;
  ls_unm=dw_log.GetItemString(1,"user_name1");
  ls_pass=dw_log.GetItemString(1,"password1");
  select password1 into :ls_field  from login1 where login1.user_name1=:ls_unm;
  if(ls_field=ls_pass) then  
  commit; 
  close (w_login);
  open(w_main);
  else
   rollback;
   messagebox( "","login faild");
   dw_log.Reset();
   dw_log.InsertRow(0);
   end if
      END if
  </code></pre>
  
  <p>but I got always "login faild" response even I checked through it by debug mode
  how I make the proper login with this</p>