⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 param_readlongorlob.html

📁 通用的数据库中间库
💻 HTML
字号:
<html><head><meta name="KEYWORDS" content="      library, C++,       Oracle, SQLServer, DB2, Sybase, Informix, InterBase, SQLBase, ODBC, 
      SQL, server, client, database, programming, development, software, 
      Win32, Windows, Linux, Unix, Solaris,
      Microsoft, Borland, Centura, Gupta, IBM"><meta name="DESCRIPTION" content=
"SQLAPI++ is C++ library for accessing SQL databases (Oracle, SQLServer, Sybase, DB2, InterBase, SQLBase, Informix, ODBC).
It uses native APIs, provides low-level access to database-specific features."><title>SQLAPI++ Library - Online Documentation - SAParam::ReadLongOrLob</title></head><body bgcolor="#ffffff" BACKGROUND="../images/bg.gif" text="#000000"><!--GlbHdr--> <table WIDTH="600" height="40" frame="hsides" BORDER="2" BORDERCOLOR="#004fcd" align="right" cellpadding="0" cellspacing="2" id="TABLE1">
    
    <tr><!--class="GlbDefault"-->        
        <td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/index.html" style="TEXT-DECORATION: none">
			<font color="white" size="3" face="sans-serif">
			<b>Home</b></font></A></td></TD>
        <td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/HowTo/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>How To</b></font></A></td><!--class="GlbActive"-->
        <td width="70" bgcolor="#00bb00" bordercolor="black" align="middle"><A href="/OnLineDoc/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>Online Documentation</b></font></A></td><!--class="GlbDefault"-->        
		<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/Support/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>Support</b></font></A></td>
        <td width=70 bgcolor=#000094 bordercolor=black align=middle><A href="/Download/index.html" style="TEXT-DECORATION: none" >
			<font color=white size=3  face=sans-serif>
			<b>Download</b></font></A></td>
        <td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/Order/index.html" style="TEXT-DECORATION: none">			<font color="white" size="3" face="sans-serif">
			<b>Order</b></font></A></td>    </tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="100%">
	<tr>
		<td valign="top" width="165"><!--LeftMenu-->			
			<table frame="void" CELLSPACING="5" width="165">
				<tr><td><p>&nbsp;</p></td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"><A href="Command.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SACommand</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"><A href="Connection.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAConnection</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"><A href="Exception.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAException</font></A> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"><A href="Field.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAField</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align="middle" src="../images/red.gif" WIDTH="12" HEIGHT="12"><A href="Param.html" style="TEXT-DECORATION: none">
					<font color="white" size="2" face="sans-serif">
					SAParam</A> </FONT> </td>
				</tr>
				<tr><td><hr></td></tr>
				<tr>
					<td><img align=middle src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="String.html" style ="TEXT-DECORATION: none" >
					<font color=white size=2 face=sans-serif>
					SAString</A> </FONT> </td>
				</tr>
				<tr>
					<td><img align=middle src="../images/green.gif" WIDTH="12" HEIGHT="12">
					<A href="DateTime.html" style ="TEXT-DECORATION: none" >
					<font color=white size=2 face=sans-serif>
					SADateTime</A> </FONT> </td>
				</tr>
			</table>
		</td><!--empty column-->
		<td width="20"> 
			<p>&nbsp;&nbsp;</p>
		</td><!--Content-->
		<td valign="top" align="left">
			<table width="100%" cellspacing="2" cellpadding="2">
				<tr>
					<td align="left">	<A href="Param_Usage.html" style="TEXT-DECORATION: none"><h3>Usage</h3></A>
					</td>
					<td align="left">	<A href="Param.html" style="TEXT-DECORATION: none"><h3>Class Members</h3></A>
					</td>
					<td align="left">	<A href="Param_Examples.html" style="TEXT-DECORATION: none"><h3>Examples</h3></A>
					</td>
				</tr>			
				<tr>
					<td colspan="3"><h1>SAParam::ReadLongOrLob</h1></td>
				</tr>			
			</table>

			<p><font face="Arial"><STRONG>void 
      ReadLongOrLob(</STRONG> <STRONG>saLongOrLobReader_t</STRONG> 
      fnReader, 
      <STRONG>unsigned int</STRONG> 
            nReaderWantedPieceSize, <STRONG>void 
      *</STRONG>pAddlData <STRONG> );<BR>throw 
      (SAException);</STRONG></font></p>

			<p> 
              Starts reading of Long 
              or BLob(CLob) value using user defined 
              callback. 
			</p>
            <P>
            <H3>Parameters</H3>
            <P><EM>fnReader</EM>.&nbsp;&nbsp;&nbsp; The name of user function 
            used for Long or BLob(CLob) data reading. The function must have 
            syntax declared by <A 
            href="Enums.html#saLongOrLobReader_t">saLongOrLobReader_t 
            typedef</A> 
            .</P>
            <P><EM>nReaderWantedPieceSize</EM>.&nbsp;&nbsp;&nbsp; Size of piece 
            of data user want to get to callback function.</P>
            <P><EM>pAddData</EM>.&nbsp;&nbsp;&nbsp; Additional data, passed to 
            callback function.&nbsp;&nbsp;</P>
            <H3>Remarks</H3>
            <P> 
             After 
            a command execution all output parameters are updated by their 
            values, including Long and BLob(CLob) parameters. If you want to 
            control piecewise reading of Long or BLob(CLob) data you should do 
            the following:</P>
            <OL>
                <LI>Before a command execution set <STRONG 
                >SA_LongOrLobReaderManual</STRONG>
                reading 
                mode (see <A href="ValueRead_setLongOrLobReaderMode.html" >setLongOrLobReaderMode</A>) 
                for Long or BLob(CLob) parameters you want to process by user 
                defined function(s). After that each 
                fetch will 
                skip reading Long and BLob(CLob) parameters that you set to be 
                read manually. 
                <LI>After a command 
                execution use 
                <STRONG>ReadLongOrLob</STRONG> 
                method for 
                each parameter defined to be read manually.</LI></OL>
            <P>Note, that if the command has result set(s) 
            (it is possible in some servers, see <STRONG>Server specific 
            notes</STRONG>       ) then output 
            parameters are available only after all result sets are completely 
            processed using <A href="Command_FetchNext.html" >SACommand::FetchNext</A> 
            method.</P>
            <P><STRONG>ReadLongOrLob</STRONG> 
            method will repeatedly call user 
            defined function:</P>
            <P><FONT face=System>void &lt;function 
            Name&gt;(SAPieceType_t ePieceType, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            void *pBuf, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            unsigned int nLen, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            unsigned int nBlobSize, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            void *pAddlData);</FONT></P>
            <P>User 
            defined function has the following parameters:</P>
            <P><EM>ePieceType</EM>.&nbsp;&nbsp;&nbsp; Parameter passed to the 
            function from SQLAPI++ Library mechanisms. It&nbsp; defines which 
            piece of data value was read. Can be one of the next <STRONG 
            >SAPieceType_t</STRONG> 
            enum values:</P>
            <UL>
                <LI><STRONG>SA_FirstPiece</STRONG>&nbsp;&nbsp;&nbsp; The first (but 
                not the last) piece of data was read. 
                <LI><STRONG>SA_NextPiece</STRONG>&nbsp;&nbsp;&nbsp; The next (not the 
                first and not the last) piece of data was read. 
                <LI><STRONG>SA_LastPiece</STRONG>&nbsp;&nbsp;&nbsp; The last piece of 
                data was read. 
                <LI><STRONG>SA_OnePiece</STRONG>&nbsp;&nbsp;&nbsp; All parameter data 
                was read as one block.</LI></UL>
            <P><EM>pBuf</EM>.&nbsp;&nbsp;&nbsp; Pointer to the buffer that 
            contains the data block read from database.</P>
            <P><EM>nLen</EM>.&nbsp;&nbsp;&nbsp; The actual size of data in buffer 
            <EM>pBuf</EM>.</P>
            <P><EM>nBlobSize</EM>.&nbsp;&nbsp;&nbsp; A size of whole Long or 
            BLob(CLob) parameter (if DBMS server allows to know it before whole 
            parameter was read; otherwise 0).</P>
            <P><EM>pAddData</EM>.&nbsp;&nbsp;&nbsp; An additional data user want 
            to pass to the function.</P>
            <P>To get more information about reading Long 
            and BLob(CLob) data see <A href="../Examples/step6.cpp" >Query examples - Step 
            6</A>. </P>
            <P></P>
			
			<h3>Server specific notes</h3>
      <P>See <A 
            href="../ServerSpecific/index.html">Server specific information</A> 
            concerning your SQL server.</P>

			<h3>Problems and Questions</h3>
			<p>			If 
			you don't find the answer to you questions or 
            have some problems on using the Library, please, send e-mail to <A href="mailto:howto@sqlapi.com">howto@sqlapi.com</A>.
			</p>
		</td>
	<tr></tr>
</table>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -