<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->
<!--(Document created with RoboEditor. )============================-->
<!--(==============================================================)-->

<head>

<title>dbclose</title>

<!--(Meta)==========================================================-->

<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=903>
<meta name=layout-width content=938>
<meta name=date content="06 17, 2002 2:46:32 PM">


<!--(Links)=========================================================-->

<link rel=StyleSheet href=default.css>



</head>

<!--(Body)==========================================================-->


<body>

<h1>dbclose</h1>

<h2>Purpose</h2>

<p>Close the currently open database.</p>

<h2>Syntax</h2>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0.5pt;
			margin-bottom: 0.5pt;">return_bool = dbclose()</p>

<p style="margin-left: 40px;
			line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0.5pt;
			margin-bottom: 0.5pt;">return_bool - True if successful, else false<span style="margin-left: 40px;
	line-height: normal;
	margin-bottom: 14pt;
	margin-top: 14pt;
	x-text-tab-stops: repeat 1in;
	white-space: nowrap;
	font-family: monospace;
	font-size: 10pt;"><br>
&nbsp;</span></p>

<h2>Returns</h2>

<p>True if successful.</p>

<h2>Remarks</h2>

<p>Close the currently open database. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->NLP++ 
 currently allows only one database to be open at a time.</p>

<h2>Example</h2>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">@CODE</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">dbopen(&quot;test&quot;,&quot;root&quot;,&quot;mypassword&quot;);</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">dballocstmt();</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><span style="line-height: normal;
												x-text-tab-stops: repeat 1in;
												white-space: nowrap;
												font-family: monospace;
												font-size: 10pt;">dbexecstmt(&quot;SELECT * FROM table;&quot;);</span></p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">dbbindcol(1,&quot;varchar&quot;,50,&amp;G(&quot;employee name&quot;),&amp;G(&quot;result1&quot;));</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">while (dbfetch())</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->{</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->&quot;output.txt&quot; &lt;&lt; &quot;employee name: &quot;;</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->if (G(&quot;result1&quot;))</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->&quot;output.txt&quot; &lt;&lt; G(&quot;employee name&quot;) &lt;&lt; &quot;\n&quot;;</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->else</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->&quot;output.txt&quot; &lt;&lt; &quot;NULL&quot; &lt;&lt; &quot;\n&quot;;</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;"><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->}</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">dbfreestmt();</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">dbclose();</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">@@CODE</p>

<p style="line-height: normal;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;
			margin-top: 0pt;
			margin-bottom: 0pt;">&nbsp;</p>

<h2>See Also</h2>

<p><a href="Table_of_Database_Functions.htm">Table of Database Functions</a></p>

<p><a href="Sample_Analyzers/Database1_Analyzer.htm">Database1 Analyzer</a></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

</body>

</html>
