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

<html>

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

<head>

<title>Table of Database Functions</title>

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

<meta http-equiv=content-type content="text/html; charset=windows-1252">
<meta name=date content="06 17, 2002 2:21:56 PM">
<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=811>
<meta name=layout-width content=775>


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

<link rel="StyleSheet" href="default.css">



</head>

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


<body>

<h1>Table of Database Functions</h1>

<p>The NLP++ functions for interfacing with a database are listed here 
 in table form for easy reference. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->For 
 examples of these functions, refer to the individual function pages included 
 in the Database Functions section. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Also 
 available is a sample analyzer illustrating connection to a database, 
 in <span style="font-weight: bold;">Samples\database1</span>. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->An 
 introductory page is available at <a href="Sample_Analyzers/Database1_Analyzer.htm">Database1 
 Analyzer</a>.</p>

<!--(Table)=========================================================-->
<table x-use-null-cells
		wrapperparagraphselector=P
		style="width: 100%;
				x-border-left: 1px table-solid;
				x-border-top: 1px table-solid;
				x-border-right: 1px table-solid;
				x-border-bottom: 1px table-solid;
				border-spacing: 0px;
				margin-top: 14pt;
				x-border-left: 1px table-solid;
				x-border-top: 1px table-solid;
				x-border-right: 1px table-solid;
				x-border-bottom: 1px table-solid;
				border-collapse: separate;
				border-spacing: 0px;"
		cellspacing=0
		width=100%
		border=1>

<tr>
<td style="background-color: #00ff00;
			x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	bgcolor=#00FF00
	width=15%>
<p style="margin-bottom: 0;"><font style="color: #000000;"
									color=#000000><span style="font-weight: bold;">FUNCTION 
 NAME</span></font></td>
<td style="background-color: #00ff00;
			x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	bgcolor=#00FF00
	width=9%>
<p style="margin-bottom: 0;"><font style="color: #000000;"
									color=#000000><span style="font-weight: bold;">RETURNS</span></font></td>
<td style="background-color: #00ff00;
			x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	bgcolor=#00FF00
	width=76%>
<p style="margin-bottom: 0;"><font style="color: #000000;"
									color=#000000><span style="font-weight: bold;">DESCRIPTION</span></font></td></tr>

<tr>
<td style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">dballocstmt()</span></td>
<td style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0; font-weight: bold;">BOOL</td>
<td style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Create a handle for an active database statement. 
 <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->(Stored 
 internally, allows only one active handle at a time.)</td></tr>

<tr>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="margin-bottom: 0; font-weight: bold;">dbbindcol(column_num, type_str, 
 size_str, &amp;var, &amp;flag_var)</td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0; font-weight: bold;">BOOL</td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Bind the given database column number to the 
 NLP++ variable <span style="font-weight: bold;">var</span>. <span style="font-weight: bold;">type_str</span> 
 specifies the database data type being fetched. <!--kadov_tag{{<spaces>}}-->&nbsp;<span 
 style="font-weight: bold;"><!--kadov_tag{{</spaces>}}-->size_str</span> 
 specifies the size needed to store the database value being retrieved 
 -- for some types, it is ignored. <span style="font-weight: bold;"><!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->flag_var</span> 
 is a second NLP++ variable used to flag whether the currently fetched 
 row contains a value in the column being fetched. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Calls 
 to <span style="font-weight: bold;">dbbindcol</span> are followed by calls 
 to <span style="font-weight: bold;">dbfetch</span> in order to fetch successive 
 database rows. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Note 
 that the ampersands are needed to indicate call by reference, i.e., that 
 values are being passed up to the two NLP++ variables. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->E.g., 
 <span style="font-style: italic;">dbbindcol(1,&quot;string&quot;,255, 
 &amp;G(&quot;employee name&quot;),&amp;G(&quot;result flag&quot;));</span></td></tr>

<tr>
<td style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">dbclose()</span></td>
<td style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0; font-weight: bold;">BOOL</td>
<td style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Close the currently open database. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->(Only 
 one database can be open at a time.)</td></tr>

<tr>
<td style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">dbexec(cmd_str)</span></td>
<td style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">BOOL</span></td>
<td style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Send a statement to the currently open database. 
 <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->A modular 
 function that creates a statement handle, sends the command string, then 
 closes the statement handle.</td></tr>

<tr>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">dbexecstmt(cmd_str)</span></td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">BOOL</span></td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Send a statement using the currently open 
 statement handle. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Assumes 
 a statement has been opened with <span style="font-weight: bold;">dballocstmt</span>.</td></tr>

<tr>
<td style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="margin-bottom: 0;"><span style="font-weight: bold;">dbfetch()</span></td>
<td style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0; font-weight: bold;">BOOL</td>
<td style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Fetch a row from a database. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Columns 
 bound by previous calls to <span style="font-weight: bold;">dbbindcol</span> 
 will get their variables filled with values from the columns in this database 
 row. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Returns 
 1 as long as rows successfully fetched, else 0.</td></tr>

<tr>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="font-weight: bold;">dbfreestmt()</td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0; font-weight: bold;"><span style="font-weight: bold;">BOOL</span></td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Frees the statement handle allocated by <span 
 style="font-weight: bold;">dballocstmt</span>. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Only 
 one statement handle can be active at a time.</td></tr>

<tr>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p style="font-weight: bold;">dbopen(db_str [, user_str] [, password_str])</td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p style="margin-bottom: 0; font-weight: bold;"><span style="font-weight: bold;">BOOL</span></td>
<td colspan=1
	rowspan=1
	style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">Open the given database name with user name 
 and password. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Depending 
 on the database and account set up, the user name and password may be 
 optional.</td></tr>

<tr>
<td style="x-cell-content-align: TOP;
			width: 15%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=15%>
<p>&nbsp;</td>
<td style="x-cell-content-align: TOP;
			width: 9%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=9%>
<p>&nbsp;</td>
<td style="x-cell-content-align: TOP;
			width: 76%;
			padding-left: 2px;
			padding-top: 2px;
			padding-right: 2px;
			padding-bottom: 2px;"
	valign=top
	width=76%>
<p style="margin-bottom: 0;">&nbsp;</td></tr>
</table>

<h2>&nbsp;</h2>

<p>&nbsp;</p>

<h2>See Also</h2>

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

<p>&nbsp;</p>

</body>

</html>
