56 lines
3.5 KiB
HTML
56 lines
3.5 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Parameter markers" />
|
|
<meta name="abstract" content="Parameter markers act as place holders for values that are supplied by the program when you instruct the data source to run the SQL statement." />
|
|
<meta name="description" content="Parameter markers act as place holders for values that are supplied by the program when you instruct the data source to run the SQL statement." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzaikodbcapiinfo.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="parmmarkers" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Parameter markers</title>
|
|
</head>
|
|
<body id="parmmarkers"><a name="parmmarkers"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Parameter markers</h1>
|
|
<div><p>Parameter markers act as place holders for values that are supplied
|
|
by the program when you instruct the data source to run the SQL statement.</p>
|
|
<div class="section"><p>When you use <strong>SQLPrepare</strong>, the statement that contains the
|
|
parameter markers is passed to the data source to be prepared by the SQL <a href="rzaikoptimizer.htm#optimizer">Optimizer</a>. The Optimizer builds a plan
|
|
of the statement and holds it for later reference. Each parameter marker must
|
|
be associated with a program variable (strictly, a pointer to a program variable),
|
|
and <strong>SQLBindParameter</strong> is used for this purpose.</p>
|
|
</div>
|
|
<div class="section"><p><strong>SQLBindParameter</strong> is a complex function. Careful study of
|
|
the relevant section in the <cite>Microsoft<sup>®</sup> ODBC Software Development
|
|
Kit and Programmer's Reference</cite> ISBN 1-57231-516-4 is strongly recommended.
|
|
For most SQL statements, using <strong>SQLBindParameter</strong> provides input information
|
|
to the function, but with stored procedures it also can receive data back.</p>
|
|
</div>
|
|
<div class="section"><p>After you have prepared the statement and bound the parameters,
|
|
use <strong>SQLExecute</strong> to set to the data source the current values of the
|
|
associated variables.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikodbcapiinfo.htm" title="Identify the files required to build an ODBC application.">Files required to build an ODBC application</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |