Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 015211042b50454b9a90b1b1f3a70f38 > files > 512

freetds-doc-1.00.83-2.mga7.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FreeTDS API: Bulk copy functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FreeTDS API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Bulk copy functions<div class="ingroups"><a class="el" href="a00517.html">The db-lib API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Functions to bulk-copy (a/k/a <em>bcp</em>) data to/from the database.  
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Bulk copy functions:</div>
<div class="dyncontent">
<center><table><tr><td><div class="center"><iframe scrolling="no" frameborder="0" src="a00520.svg" width="515" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:a00521"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00521.html">Internal bcp functions</a></td></tr>
<tr class="memdesc:a00521"><td class="mdescLeft">&#160;</td><td class="mdescRight">Static functions internal to the bcp library. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa23f8e5c7f437a94746c90292dd1cb01"><td class="memItemLeft" align="right" valign="top">DBINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01">bcp_batch</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc)</td></tr>
<tr class="memdesc:gaa23f8e5c7f437a94746c90292dd1cb01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Commit a set of rows to the table.  <a href="#gaa23f8e5c7f437a94746c90292dd1cb01">More...</a><br /></td></tr>
<tr class="separator:gaa23f8e5c7f437a94746c90292dd1cb01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6cf03708baaf02eb016b9ee77160d879"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879">bcp_bind</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, BYTE *varaddr, int prefixlen, DBINT varlen, BYTE *terminator, int termlen, int db_vartype, int table_column)</td></tr>
<tr class="memdesc:ga6cf03708baaf02eb016b9ee77160d879"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bind a program host variable to a database column.  <a href="#ga6cf03708baaf02eb016b9ee77160d879">More...</a><br /></td></tr>
<tr class="separator:ga6cf03708baaf02eb016b9ee77160d879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0ed03c69e698336d015bb315ad755fd5"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5">bcp_colfmt</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, int host_colnum, int host_type, int host_prefixlen, DBINT host_collen, const BYTE *host_term, int host_termlen, int table_colnum)</td></tr>
<tr class="memdesc:ga0ed03c69e698336d015bb315ad755fd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify the format of a datafile prior to writing to a table.  <a href="#ga0ed03c69e698336d015bb315ad755fd5">More...</a><br /></td></tr>
<tr class="separator:ga0ed03c69e698336d015bb315ad755fd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf13b2bb12b4200752718f3a3face3870"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#gaf13b2bb12b4200752718f3a3face3870">bcp_colfmt_ps</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, int host_colnum, int host_type, int host_prefixlen, DBINT host_collen, BYTE *host_term, int host_termlen, int table_colnum, <a class="el" href="a01269.html">DBTYPEINFO</a> *typeinfo)</td></tr>
<tr class="memdesc:gaf13b2bb12b4200752718f3a3face3870"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify the format of a host file for bulk copy purposes, with precision and scale support for numeric and decimal columns.  <a href="#gaf13b2bb12b4200752718f3a3face3870">More...</a><br /></td></tr>
<tr class="separator:gaf13b2bb12b4200752718f3a3face3870"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae41d196a22c544d66212dacc5b555791"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791">bcp_collen</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, DBINT varlen, int table_column)</td></tr>
<tr class="memdesc:gae41d196a22c544d66212dacc5b555791"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the length of a host variable to be written to a table.  <a href="#gae41d196a22c544d66212dacc5b555791">More...</a><br /></td></tr>
<tr class="separator:gae41d196a22c544d66212dacc5b555791"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6498235e4ef8e41ea43b01494b28998d"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d">bcp_colptr</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, BYTE *colptr, int table_column)</td></tr>
<tr class="memdesc:ga6498235e4ef8e41ea43b01494b28998d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a> by pointing to a different host variable.  <a href="#ga6498235e4ef8e41ea43b01494b28998d">More...</a><br /></td></tr>
<tr class="separator:ga6498235e4ef8e41ea43b01494b28998d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga330b9f1028f856a9eec5115550bcb4f7"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7">bcp_columns</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, int host_colcount)</td></tr>
<tr class="memdesc:ga330b9f1028f856a9eec5115550bcb4f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate how many columns are to be found in the datafile.  <a href="#ga330b9f1028f856a9eec5115550bcb4f7">More...</a><br /></td></tr>
<tr class="separator:ga330b9f1028f856a9eec5115550bcb4f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga244547855b41788fa3a67756956fbc81"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81">bcp_control</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, int field, DBINT value)</td></tr>
<tr class="memdesc:ga244547855b41788fa3a67756956fbc81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set BCP options for uploading a datafile.  <a href="#ga244547855b41788fa3a67756956fbc81">More...</a><br /></td></tr>
<tr class="separator:ga244547855b41788fa3a67756956fbc81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b85f79f53a62ac7a728fe626d609b65"><td class="memItemLeft" align="right" valign="top">DBINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65">bcp_done</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc)</td></tr>
<tr class="memdesc:ga8b85f79f53a62ac7a728fe626d609b65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Conclude the transfer of data from program variables.  <a href="#ga8b85f79f53a62ac7a728fe626d609b65">More...</a><br /></td></tr>
<tr class="separator:ga8b85f79f53a62ac7a728fe626d609b65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a184158b27a50f713e9cfae3b746209"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209">bcp_exec</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, DBINT *rows_copied)</td></tr>
<tr class="memdesc:ga7a184158b27a50f713e9cfae3b746209"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a datafile to a table.  <a href="#ga7a184158b27a50f713e9cfae3b746209">More...</a><br /></td></tr>
<tr class="separator:ga7a184158b27a50f713e9cfae3b746209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga220f6b043602da1028f98dacb2fd00c0"><td class="memItemLeft" align="right" valign="top">DBBOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga220f6b043602da1028f98dacb2fd00c0">bcp_getl</a> (<a class="el" href="a00565.html">LOGINREC</a> *login)</td></tr>
<tr class="memdesc:ga220f6b043602da1028f98dacb2fd00c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">See if <a class="el" href="a00517.html#ga5a626d228e82be0af8449d2b8c278241" title="Enable (or prevent) bcp operations for connections made with a login. ">BCP_SETL()</a> was used to set the <a class="el" href="a00565.html">LOGINREC</a> for BCP work.  <a href="#ga220f6b043602da1028f98dacb2fd00c0">More...</a><br /></td></tr>
<tr class="separator:ga220f6b043602da1028f98dacb2fd00c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gada8e987c4a6225b9276c05ba3a4f47a0"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0">bcp_init</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)</td></tr>
<tr class="memdesc:gada8e987c4a6225b9276c05ba3a4f47a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepare for bulk copy operation on a table.  <a href="#gada8e987c4a6225b9276c05ba3a4f47a0">More...</a><br /></td></tr>
<tr class="separator:gada8e987c4a6225b9276c05ba3a4f47a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafec3feb5bac1cb33545ba01efb0a67b8"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#gafec3feb5bac1cb33545ba01efb0a67b8">bcp_options</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, int option, BYTE *value, int valuelen)</td></tr>
<tr class="memdesc:gafec3feb5bac1cb33545ba01efb0a67b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set "hints" for uploading a file.  <a href="#gafec3feb5bac1cb33545ba01efb0a67b8">More...</a><br /></td></tr>
<tr class="separator:gafec3feb5bac1cb33545ba01efb0a67b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga963c5e38bca7668afc57f5cc123d10fb"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#ga963c5e38bca7668afc57f5cc123d10fb">bcp_readfmt</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc, const char filename[])</td></tr>
<tr class="memdesc:ga963c5e38bca7668afc57f5cc123d10fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a format definition file.  <a href="#ga963c5e38bca7668afc57f5cc123d10fb">More...</a><br /></td></tr>
<tr class="separator:ga963c5e38bca7668afc57f5cc123d10fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf1130ac97f6af55e86ec70b0aa4f5b40"><td class="memItemLeft" align="right" valign="top">RETCODE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40">bcp_sendrow</a> (<a class="el" href="a00901.html">DBPROCESS</a> *dbproc)</td></tr>
<tr class="memdesc:gaf1130ac97f6af55e86ec70b0aa4f5b40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write data in host variables to the table.  <a href="#gaf1130ac97f6af55e86ec70b0aa4f5b40">More...</a><br /></td></tr>
<tr class="separator:gaf1130ac97f6af55e86ec70b0aa4f5b40"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Functions to bulk-copy (a/k/a <em>bcp</em>) data to/from the database. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaa23f8e5c7f437a94746c90292dd1cb01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa23f8e5c7f437a94746c90292dd1cb01">&sect;&nbsp;</a></span>bcp_batch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DBINT bcp_batch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Commit a set of rows to the table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>If not called, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a> will cause the rows to be saved. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Count of rows saved, or -1 on error. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_gaa23f8e5c7f437a94746c90292dd1cb01_cgraph.svg" width="248" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga6cf03708baaf02eb016b9ee77160d879"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6cf03708baaf02eb016b9ee77160d879">&sect;&nbsp;</a></span>bcp_bind()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_bind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BYTE *&#160;</td>
          <td class="paramname"><em>varaddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>prefixlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DBINT&#160;</td>
          <td class="paramname"><em>varlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BYTE *&#160;</td>
          <td class="paramname"><em>terminator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>termlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>db_vartype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>table_column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bind a program host variable to a database column. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">varaddr</td><td>address of host variable </td></tr>
    <tr><td class="paramname">prefixlen</td><td>length of any prefix found at the beginning of <em>varaddr</em>, in bytes. Use zero for fixed-length datatypes. </td></tr>
    <tr><td class="paramname">varlen</td><td>bytes of data in <em>varaddr</em>. Zero for NULL, -1 for fixed-length datatypes. </td></tr>
    <tr><td class="paramname">terminator</td><td>byte sequence that marks the end of the data in <em>varaddr</em> </td></tr>
    <tr><td class="paramname">termlen</td><td>length of <em>terminator</em> </td></tr>
    <tr><td class="paramname">vartype</td><td>datatype of the host variable </td></tr>
    <tr><td class="paramname">table_column</td><td>Nth column, starting at 1, in the table.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>The order of operation is:<ul>
<li><a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a> with <em>hfile</em> == NULL and <em>direction</em> == DB_IN.<ul>
<li><a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, once per column you want to write to</li>
</ul>
</li>
<li><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, optionally, to commit a set of rows</li>
<li><a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a> </li>
</ul>
</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, <a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81" title="Set BCP options for uploading a datafile. ">bcp_control()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>, bcp_moretext(), <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga6cf03708baaf02eb016b9ee77160d879_cgraph.svg" width="240" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga0ed03c69e698336d015bb315ad755fd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0ed03c69e698336d015bb315ad755fd5">&sect;&nbsp;</a></span>bcp_colfmt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_colfmt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_colnum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_prefixlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DBINT&#160;</td>
          <td class="paramname"><em>host_collen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const BYTE *&#160;</td>
          <td class="paramname"><em>host_term</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_termlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>table_colnum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Specify the format of a datafile prior to writing to a table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">host_colnum</td><td>datafile column number (starting with 1, not zero). </td></tr>
    <tr><td class="paramname">host_type</td><td>dataype token describing the data type in <em>host_colnum</em>. E.g. SYBCHAR for character data. </td></tr>
    <tr><td class="paramname">host_prefixlen</td><td>size of the prefix in the datafile column, if any. For delimited files: zero. May be 0, 1, 2, or 4 bytes. The prefix will be read as an integer (not a character string) from the data file, and will be interpreted the data size of that column, in bytes. </td></tr>
    <tr><td class="paramname">host_collen</td><td>maximum size of datafile column, exclusive of any prefix/terminator. Just the data, ma'am. Special values:<ul>
<li><b>0</b> indicates NULL.</li>
<li><b>-1</b> for fixed-length non-null datatypes</li>
<li><b>-1</b> for variable-length datatypes (e.g. SYBCHAR) where the length is established by a prefix/terminator. </li>
</ul>
</td></tr>
    <tr><td class="paramname">host_term</td><td>the sequence of characters that will serve as a column terminator (delimiter) in the datafile. Often a tab character, but can be any string of any length. Zero indicates no terminator. Special characters:<ul>
<li><b>'\0'</b> terminator is an ASCII NUL.</li>
<li><b>'\t'</b> terminator is an ASCII TAB.</li>
<li><b>'\n'</b> terminator is an ASCII NL. </li>
</ul>
</td></tr>
    <tr><td class="paramname">host_termlen</td><td>the length of <em>host_term</em>, in bytes. </td></tr>
    <tr><td class="paramname">table_colnum</td><td>Nth column, starting at 1, in the table that maps to <em>host_colnum</em>. If there is a column in the datafile that does not map to a table column, set <em>table_colnum</em> to zero.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd><a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a> is called once for each column in the datafile, as specified with <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>. In so doing, you describe to FreeTDS how to parse each line of your datafile, and where to send each field.</dd></dl>
<p>When a prefix or terminator is used with variable-length data, <em>host_collen</em> may have one of three values:</p><ul>
<li><b>positive</b> indicating the maximum number of bytes to be used</li>
<li><b>0</b> indicating NULL</li>
<li><b>-1</b> indicating no maximum; all data, as described by the prefix/terminator will be used.</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#gaf13b2bb12b4200752718f3a3face3870" title="Specify the format of a host file for bulk copy purposes, with precision and scale support for numeri...">bcp_colfmt_ps()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, <a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81" title="Set BCP options for uploading a datafile. ">bcp_control()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>, <a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a>, <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga0ed03c69e698336d015bb315ad755fd5_cgraph.svg" width="251" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="gaf13b2bb12b4200752718f3a3face3870"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf13b2bb12b4200752718f3a3face3870">&sect;&nbsp;</a></span>bcp_colfmt_ps()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_colfmt_ps </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_colnum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_prefixlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DBINT&#160;</td>
          <td class="paramname"><em>host_collen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BYTE *&#160;</td>
          <td class="paramname"><em>host_term</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_termlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>table_colnum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a01269.html">DBTYPEINFO</a> *&#160;</td>
          <td class="paramname"><em>typeinfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Specify the format of a host file for bulk copy purposes, with precision and scale support for numeric and decimal columns. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">host_colnum</td><td>datafile column number (starting with 1, not zero). </td></tr>
    <tr><td class="paramname">host_type</td><td>dataype token describing the data type in <em>host_colnum</em>. E.g. SYBCHAR for character data. </td></tr>
    <tr><td class="paramname">host_prefixlen</td><td>size of the prefix in the datafile column, if any. For delimited files: zero. May be 0, 1, 2, or 4 bytes. The prefix will be read as an integer (not a character string) from the data file, and will be interpreted the data size of that column, in bytes. </td></tr>
    <tr><td class="paramname">host_collen</td><td>maximum size of datafile column, exclusive of any prefix/terminator. Just the data, ma'am. Special values:<ul>
<li><b>0</b> indicates NULL.</li>
<li><b>-1</b> for fixed-length non-null datatypes</li>
<li><b>-1</b> for variable-length datatypes (e.g. SYBCHAR) where the length is established by a prefix/terminator. </li>
</ul>
</td></tr>
    <tr><td class="paramname">host_term</td><td>the sequence of characters that will serve as a column terminator (delimiter) in the datafile. Often a tab character, but can be any string of any length. Zero indicates no terminator. Special characters:<ul>
<li><b>'\0'</b> terminator is an ASCII NUL.</li>
<li><b>'\t'</b> terminator is an ASCII TAB.</li>
<li><b>'\n'</b> terminator is an ASCII NL. </li>
</ul>
</td></tr>
    <tr><td class="paramname">host_termlen</td><td>the length of <em>host_term</em>, in bytes. </td></tr>
    <tr><td class="paramname">table_colnum</td><td>Nth column, starting at 1, in the table that maps to <em>host_colnum</em>. If there is a column in the datafile that does not map to a table column, set <em>table_colnum</em> to zero. </td></tr>
    <tr><td class="paramname">typeinfo</td><td>something </td></tr>
  </table>
  </dd>
</dl>
<dl class="todo"><dt><b><a class="el" href="a00515.html#_todo000002">Todo:</a></b></dt><dd>Not implemented. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, <a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81" title="Set BCP options for uploading a datafile. ">bcp_control()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>, <a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a>, <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_gaf13b2bb12b4200752718f3a3face3870_cgraph.svg" width="274" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="gae41d196a22c544d66212dacc5b555791"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae41d196a22c544d66212dacc5b555791">&sect;&nbsp;</a></span>bcp_collen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_collen </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DBINT&#160;</td>
          <td class="paramname"><em>varlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>table_column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the length of a host variable to be written to a table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">varlen</td><td>size of the variable, in bytes, or<ul>
<li><b>0</b> indicating NULL</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><b>-1</b> indicating size is determined by the prefix or terminator. (If both a prefix and a terminator are present, bcp is supposed to use the smaller of the two. This feature might or might not actually work.) <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">table_column</td><td>the number of the column in the table (starting with 1, not zero).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> </dd></dl>
</li>
</ul>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_gae41d196a22c544d66212dacc5b555791_cgraph.svg" width="251" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga6498235e4ef8e41ea43b01494b28998d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6498235e4ef8e41ea43b01494b28998d">&sect;&nbsp;</a></span>bcp_colptr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_colptr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BYTE *&#160;</td>
          <td class="paramname"><em>colptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>table_column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Override <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a> by pointing to a different host variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">colptr</td><td>The pointer, the address of your variable. </td></tr>
    <tr><td class="paramname">table_column</td><td>The 1-based column ordinal in the table. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Use between calls to <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a>. After calling <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, subsequent calls to <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> will bind to the new address. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga6498235e4ef8e41ea43b01494b28998d_cgraph.svg" width="248" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga330b9f1028f856a9eec5115550bcb4f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga330b9f1028f856a9eec5115550bcb4f7">&sect;&nbsp;</a></span>bcp_columns()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_columns </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>host_colcount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Indicate how many columns are to be found in the datafile. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">host_colcount</td><td>count of columns in the datafile, irrespective of how many you intend to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>This function describes the file as it is, not how it will be used.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. It's hard to see how it could fail. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga330b9f1028f856a9eec5115550bcb4f7_cgraph.svg" width="264" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga244547855b41788fa3a67756956fbc81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga244547855b41788fa3a67756956fbc81">&sect;&nbsp;</a></span>bcp_control()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_control </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DBINT&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set BCP options for uploading a datafile. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">field</td><td>symbolic constant indicating the option to be set, one of:<ul>
<li><b>BCPMAXERRS</b> Maximum errors tolerated before quitting. The default is 10.</li>
<li><b>BCPFIRST</b> The first row to read in the datafile. The default is 1.</li>
<li><b>BCPLAST</b> The last row to read in the datafile. The default is to copy all rows. A value of -1 resets this field to its default?</li>
<li><b>BCPBATCH</b> The number of rows per batch. Default is 0, meaning a single batch. </li>
</ul>
</td></tr>
    <tr><td class="paramname">value</td><td>The value for <em>field</em>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>These options control the behavior of <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>. When writing to a table from application host memory variables, program logic controls error tolerance and batch size.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>, <a class="el" href="a00520.html#gafec3feb5bac1cb33545ba01efb0a67b8" title="Set &quot;hints&quot; for uploading a file. ">bcp_options()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga244547855b41788fa3a67756956fbc81_cgraph.svg" width="256" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga8b85f79f53a62ac7a728fe626d609b65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8b85f79f53a62ac7a728fe626d609b65">&sect;&nbsp;</a></span>bcp_done()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DBINT bcp_done </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Conclude the transfer of data from program variables. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Do not overlook this function. According to Sybase, failure to call <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a> "will result in unpredictable errors". </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>As with <a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, the count of rows saved, or -1 on error. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, bcp_moretext(), <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga8b85f79f53a62ac7a728fe626d609b65_cgraph.svg" width="246" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga7a184158b27a50f713e9cfae3b746209"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7a184158b27a50f713e9cfae3b746209">&sect;&nbsp;</a></span>bcp_exec()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_exec </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DBINT *&#160;</td>
          <td class="paramname"><em>rows_copied</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write a datafile to a table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">rows_copied</td><td>bcp_exec will write the count of rows successfully written to this address. If <em>rows_copied</em> is NULL, it will be ignored by db-lib.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, <a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81" title="Set BCP options for uploading a datafile. ">bcp_control()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a>, <a class="el" href="a00520.html#gaf1130ac97f6af55e86ec70b0aa4f5b40" title="Write data in host variables to the table. ">bcp_sendrow()</a> </dd></dl>

</div>
</div>
<a id="ga220f6b043602da1028f98dacb2fd00c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga220f6b043602da1028f98dacb2fd00c0">&sect;&nbsp;</a></span>bcp_getl()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DBBOOL bcp_getl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00565.html">LOGINREC</a> *&#160;</td>
          <td class="paramname"><em>login</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>See if <a class="el" href="a00517.html#ga5a626d228e82be0af8449d2b8c278241" title="Enable (or prevent) bcp operations for connections made with a login. ">BCP_SETL()</a> was used to set the <a class="el" href="a00565.html">LOGINREC</a> for BCP work. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">login</td><td>Address of the <a class="el" href="a00565.html">LOGINREC</a> variable to be passed to <a class="el" href="a00479.html#ae408d8e1c2ab0767d8bfd26d00d1ff6a" title="Normally not used. ">dbopen()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00517.html#ga5a626d228e82be0af8449d2b8c278241" title="Enable (or prevent) bcp operations for connections made with a login. ">BCP_SETL()</a>, <a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a>, <a class="el" href="a00518.html#ga0984798bb806f7451a53bffa7e2c430f" title="Allocate a LOGINREC structure. ">dblogin()</a>, <a class="el" href="a00479.html#ae408d8e1c2ab0767d8bfd26d00d1ff6a" title="Normally not used. ">dbopen()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga220f6b043602da1028f98dacb2fd00c0_cgraph.svg" width="236" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="gada8e987c4a6225b9276c05ba3a4f47a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gada8e987c4a6225b9276c05ba3a4f47a0">&sect;&nbsp;</a></span>bcp_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>tblname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>hfile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>errfile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>direction</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prepare for bulk copy operation on a table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">tblname</td><td>the name of the table receiving or providing the data. </td></tr>
    <tr><td class="paramname">hfile</td><td>the data file opposite the table, if any. </td></tr>
    <tr><td class="paramname">errfile</td><td>the "error file" captures messages and, if errors are encountered, copies of any rows that could not be written to the table. </td></tr>
    <tr><td class="paramname">direction</td><td>one of<ul>
<li><b>DB_IN</b> writing to the table</li>
<li><b>DB_OUT</b> writing to the host file</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd><a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a> sets the host file data format and acquires the table metadata. It is called before the other bulk copy functions.</dd></dl>
<p>When writing to a table, bcp can use as its data source a data file (<em>hfile</em>), or program data in an application's variables. In the latter case, call <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a> to associate your data with the appropriate table column. </p><dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00517.html#ga5a626d228e82be0af8449d2b8c278241" title="Enable (or prevent) bcp operations for connections made with a login. ">BCP_SETL()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_gada8e987c4a6225b9276c05ba3a4f47a0_cgraph.svg" width="232" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="gafec3feb5bac1cb33545ba01efb0a67b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafec3feb5bac1cb33545ba01efb0a67b8">&sect;&nbsp;</a></span>bcp_options()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_options </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>option</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BYTE *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valuelen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set "hints" for uploading a file. </p>
<p>A FreeTDS-only function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">option</td><td>symbolic constant indicating the option to be set, one of:<ul>
<li><b>BCPLABELED</b> Not implemented.</li>
<li><b>BCPHINTS</b> The hint to be passed when the bulk-copy begins. </li>
</ul>
</td></tr>
    <tr><td class="paramname">value</td><td>The string constant for <em>option</em> a/k/a the hint. One of:<ul>
<li><b>ORDER</b> The data are ordered in accordance with the table's clustered index.</li>
<li><b>ROWS_PER_BATCH</b> The batch size</li>
<li><b>KILOBYTES_PER_BATCH</b> The approximate number of kilobytes to use for a batch size</li>
<li><b>TABLOCK</b> Lock the table</li>
<li><b>CHECK_CONSTRAINTS</b> Apply constraints</li>
<li><b>FIRE_TRIGGERS</b> Fire any INSERT triggers on the target table </li>
</ul>
</td></tr>
    <tr><td class="paramname">valuelen</td><td>The strlen of <em>value</em>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81" title="Set BCP options for uploading a datafile. ">bcp_control()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>, </dd></dl>
<dl class="todo"><dt><b><a class="el" href="a00515.html#_todo000003">Todo:</a></b></dt><dd>Simplify. Remove <em>valuelen</em>, and dbproc-&gt;bcpinfo-&gt;hint = strdup(hints[i]) </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_gafec3feb5bac1cb33545ba01efb0a67b8_cgraph.svg" width="260" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ga963c5e38bca7668afc57f5cc123d10fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga963c5e38bca7668afc57f5cc123d10fb">&sect;&nbsp;</a></span>bcp_readfmt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_readfmt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>filename</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a format definition file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server. </td></tr>
    <tr><td class="paramname">filename</td><td>Name that will be passed to fopen(3).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Reads a format file and calls <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a> and <a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a> as needed.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a>, <a class="el" href="a00520.html#gaf13b2bb12b4200752718f3a3face3870" title="Specify the format of a host file for bulk copy purposes, with precision and scale support for numeri...">bcp_colfmt_ps()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, bcp_writefmt() </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_ga963c5e38bca7668afc57f5cc123d10fb_cgraph.svg" width="262" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="gaf1130ac97f6af55e86ec70b0aa4f5b40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf1130ac97f6af55e86ec70b0aa4f5b40">&sect;&nbsp;</a></span>bcp_sendrow()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RETCODE bcp_sendrow </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00901.html">DBPROCESS</a> *&#160;</td>
          <td class="paramname"><em>dbproc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write data in host variables to the table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbproc</td><td>contains all information needed by db-lib to manage communications with the server.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Call <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a> first to describe the variables to be used. Use <a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a> to commit sets of rows. After sending the last row call <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>SUCCEED or FAIL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a00520.html#gaa23f8e5c7f437a94746c90292dd1cb01" title="Commit a set of rows to the table. ">bcp_batch()</a>, <a class="el" href="a00520.html#ga6cf03708baaf02eb016b9ee77160d879" title="Bind a program host variable to a database column. ">bcp_bind()</a>, <a class="el" href="a00520.html#ga0ed03c69e698336d015bb315ad755fd5" title="Specify the format of a datafile prior to writing to a table. ">bcp_colfmt()</a>, <a class="el" href="a00520.html#gae41d196a22c544d66212dacc5b555791" title="Set the length of a host variable to be written to a table. ">bcp_collen()</a>, <a class="el" href="a00520.html#ga6498235e4ef8e41ea43b01494b28998d" title="Override bcp_bind() by pointing to a different host variable. ">bcp_colptr()</a>, <a class="el" href="a00520.html#ga330b9f1028f856a9eec5115550bcb4f7" title="Indicate how many columns are to be found in the datafile. ">bcp_columns()</a>, <a class="el" href="a00520.html#ga244547855b41788fa3a67756956fbc81" title="Set BCP options for uploading a datafile. ">bcp_control()</a>, <a class="el" href="a00520.html#ga8b85f79f53a62ac7a728fe626d609b65" title="Conclude the transfer of data from program variables. ">bcp_done()</a>, <a class="el" href="a00520.html#ga7a184158b27a50f713e9cfae3b746209" title="Write a datafile to a table. ">bcp_exec()</a>, <a class="el" href="a00520.html#gada8e987c4a6225b9276c05ba3a4f47a0" title="Prepare for bulk copy operation on a table. ">bcp_init()</a>, bcp_moretext(), <a class="el" href="a00520.html#gafec3feb5bac1cb33545ba01efb0a67b8" title="Set &quot;hints&quot; for uploading a file. ">bcp_options()</a> </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00520_gaf1130ac97f6af55e86ec70b0aa4f5b40_cgraph.svg" width="268" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>