My database open (runs once only in mainstack on open card) looks like this:
<div><br></div><div>note:  I don&#39;t have any special stuff there for windows so I wonder if that is bad?</div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px &#39;Lucida Grande&#39;; min-height: 16.0px"><br>
</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><b>on</b> DatabaseOpen</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>put</b></span> <span style="color: #1e0090">&quot;&quot;</span> <span style="color: #910a91">into</span> <span style="color: #910a91">field</span> error_field  <span style="color: #910a91">of</span> <span style="color: #910a91">card</span> <span style="color: #1e0090">&quot;Client Card&quot;</span> <span style="color: #910a91">of</span> <span style="color: #910a91">stack</span> <span style="color: #1e0090">&quot;clients&quot;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>put</b></span> <span style="color: #1e0090">&quot;&quot;</span> <span style="color: #910a91">into</span> <span style="color: #910a91">field</span> IsOpenField  <span style="color: #910a91">of</span> <span style="color: #910a91">card</span> <span style="color: #1e0090">&quot;Client Card&quot;</span> <span style="color: #910a91">of</span> <span style="color: #910a91">stack</span> <span style="color: #1e0090">&quot;clients&quot;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; color: #1e0090"><span style="color: #000000">   </span><span style="color: #8e920e"><b>put</b></span><span style="color: #000000"> </span>&quot;&quot;<span style="color: #000000"> </span><span style="color: #910a91">into</span><span style="color: #000000"> </span><span style="color: #910a91">field</span><span style="color: #000000"> </span>&quot;record ID&quot;<span style="color: #000000">  </span><span style="color: #910a91">of</span><span style="color: #000000"> </span><span style="color: #910a91">card</span><span style="color: #000000"> </span>&quot;Client Card&quot;<span style="color: #000000"> </span><span style="color: #910a91">of</span><span style="color: #000000"> </span><span style="color: #910a91">stack</span><span style="color: #000000"> </span>&quot;clients&quot;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; color: #1e0090"><span style="color: #000000">   </span><span style="color: #8e920e"><b>put</b></span><span style="color: #000000"> </span>&quot;&quot;<span style="color: #000000"> </span><span style="color: #910a91">into</span><span style="color: #000000"> </span><span style="color: #910a91">field</span><span style="color: #000000"> </span>&quot;total records&quot;<span style="color: #000000">  </span><span style="color: #910a91">of</span><span style="color: #000000"> </span><span style="color: #910a91">card</span><span style="color: #000000"> </span>&quot;Client Card&quot;<span style="color: #000000"> </span><span style="color: #910a91">of</span><span style="color: #000000"> </span><span style="color: #910a91">stack</span><span style="color: #000000"> </span>&quot;clients&quot;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; min-height: 15.0px">   </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; color: #1e0090"><span style="color: #000000">   </span><span style="color: #8e920e"><b>get</b></span><span style="color: #000000"> Valentina_InitClient( </span>10<span style="color: #000000"> * </span>1024<span style="color: #000000"> * </span>1024<span style="color: #000000">,</span>&quot;hulking long serial number&quot;<span style="color: #000000">,,)</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>get</b></span> Valentina_DebugLevel(<span style="color: #1e0090">&quot;kLogParams&quot;</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>put</b></span> VConnection_Constructor(<span style="color: #1e0090">&quot;localhost&quot;</span>, <span style="color: #1e0090">&quot;sa&quot;</span>, <span style="color: #1e0090">&quot;sa&quot;</span>, <span style="color: #1e0090">15432</span>) <span style="color: #910a91">into</span> gConnection</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; min-height: 15.0px">   </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <b>if</b>  VConnection_Open( gConnection ) <span style="color: #910a91">contains</span> <span style="color: #1e0090">&quot;ERROR&quot;</span> <b>then</b>     </p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">      <span style="color: #8e920e"><b>answer</b></span> <span style="color: #910a91">error</span> Valentina_ErrString()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; color: #019103"><span style="color: #000000">      <b>return empty</b></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <b>else</b></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; color: #019103"><span style="color: #000000">      </span><b>--nothing here</b></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <b>end</b> <b>if</b>  </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>put</b></span> VDatabase_Constructor( gConnection ) <span style="color: #910a91">into</span> gDatabase</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>get</b></span> VDatabase_DateFormat(gDatabase, <span style="color: #1e0090">&quot;kYMD&quot;</span>)</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>get</b></span> VDatabase_DateSep(gDatabase, <span style="color: #1e0090">&quot;-&quot;</span>)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>get</b></span> VDatabase_Open( gDatabase, b_l_database.vdb )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; min-height: 15.0px">   </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <b>if</b> it <span style="color: #910a91">contains</span> <span style="color: #1e0090">&quot;ERROR&quot;</span> <b>then</b>    </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;; color: #1e0090"><span style="color: #000000">      </span><span style="color: #8e920e"><b>answer</b></span><span style="color: #000000"> </span>&quot;there was an error in DatabaseOpen&quot;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <b>end</b> <b>if</b></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><b>end</b> DatabaseOpen</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">
Then I call (just to be sure that it really opened):</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">
</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><b>on</b> ShowStatistics</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>put</b></span> VDatabase_Name( gDatabase )  <span style="color: #910a91">into</span> <span style="color: #910a91">field</span> <span style="color: #1e0090">&quot;error_field&quot;</span> <span style="color: #910a91">of</span> <span style="color: #910a91">card</span> <span style="color: #1e0090">&quot;Client Card&quot;</span> <span style="color: #910a91">of</span> <span style="color: #910a91">stack</span> <span style="color: #1e0090">&quot;clients&quot;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">   <span style="color: #8e920e"><b>put</b></span> VDatabase_IsOpen( gDatabase ) <span style="color: #910a91">into</span> <span style="color: #910a91">field</span> <span style="color: #1e0090">&quot;IsOpenField&quot;</span> <span style="color: #910a91">of</span> <span style="color: #910a91">card</span> <span style="color: #1e0090">&quot;Client Card&quot;</span> <span style="color: #910a91">of</span> <span style="color: #910a91">stack</span> <span style="color: #1e0090">&quot;clients&quot;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><b>end</b> ShowStatistics</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">
then I call (if the show statistics was ok) a bunch of stuff that pulls data from the database and fills out cards, option buttons etc.</p><p></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;">
<br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Lucida Grande&#39;"><br></p></div>