title: How to connect to database from oracle forms programmatically
body: <p>I am using oracle forms 6i,
  I want to connect to database programmatically using pl/sql code</p>
  
  <p>I don't want final user to insert username and password and database name when forms run like this image: </p>
  
  <p>.<a href="https://i.stack.imgur.com/Rro2n.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rro2n.jpg" alt="I don&#39;t want final user to face this dialog"></a></p>
  
  <p>I used pre-form trigger like this:</p>
  
  <pre><code>begin
      execute 'connect to hr/hr@yemensoft';   
  end;
  </code></pre>
  
  <p>But it returns with errors;</p>
  
  <blockquote>
    <p><code>error 103 at line2, column 10 encountered the symbol "connect to hr/hr@yemensoft" when expecting one of the following: :=.(@%;</code></p>
  </blockquote>