File: PreparedStatement_8h.html

package info (click to toggle)
libzdb 3.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,600 kB
  • sloc: javascript: 7,158; ansic: 6,413; sh: 3,993; cpp: 582; makefile: 114; xml: 59; lex: 35
file content (656 lines) | stat: -rw-r--r-- 47,760 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PreparedStatement.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="libzdb.css">
</head><body>
<a href="" class="back" onclick="history.back();return false;">⬅</a>
<!-- Generated by Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bb61871b4c63e4e6685a8d6c52430594.html">zdb</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle"><div class="title">PreparedStatement.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <b>PreparedStatement</b> represents a single SQL statement pre-compiled into byte code for later execution. </p>
<p>The SQL statement may contain <em>in</em> parameters of the form <code>?</code>. Such parameters represent unspecified literal values (or "wildcards") to be filled in later by the various setter methods defined in this interface. Each <em>in</em> parameter has an associated index number which is its sequence in the statement. The first <em>in</em> '?' parameter has index 1, the next has index 2 and so on. A PreparedStatement is created by calling <a class="el" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5" title="Prepares a SQL statement for execution.">Connection_prepareStatement()</a>.</p>
<p>Consider this statement: </p><div class="fragment"><div class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> employee(name, photo) <span class="keyword">VALUES</span>(?, ?)</div>
</div><!-- fragment --><p> There are two <em>in</em> parameters in this statement, the parameter for setting the name has index 1 and the one for the photo has index 2. To set the values for the <em>in</em> parameters we use a setter method. Assuming name has a string value we use <a class="el" href="#a618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value.">PreparedStatement_setString()</a>. To set the value of the photo we submit a binary value using the method <a class="el" href="#ac19d3cb5e6ee2222c1320f9aee7547ff" title="Sets the in parameter at index parameterIndex to the given blob value.">PreparedStatement_setBlob()</a>.</p>
<h2><a class="anchor" id="autotoc_md17"></a>
Example</h2>
<p>To summarize, here is the code in context.</p>
<div class="fragment"><div class="line">PreparedStatement_T p = <a class="code hl_function" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5">Connection_prepareStatement</a>(con, <span class="stringliteral">&quot;INSERT INTO employee(name, photo) VALUES(?, ?)&quot;</span>);</div>
<div class="line"><a class="code hl_function" href="#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a>(p, 1, <span class="stringliteral">&quot;Kamiya Kaoru&quot;</span>);</div>
<div class="line"><a class="code hl_function" href="#ac19d3cb5e6ee2222c1320f9aee7547ff">PreparedStatement_setBlob</a>(p, 2, jpeg, jpeg_size);</div>
<div class="line"><a class="code hl_function" href="#a6f0eb01daec7f61bf92707b7de0a246f">PreparedStatement_execute</a>(p);</div>
<div class="ttc" id="aConnection_8h_html_a16dfbbe273d9a872462bed182dec3bb5"><div class="ttname"><a href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5">Connection_prepareStatement</a></div><div class="ttdeci">PreparedStatement_T Connection_prepareStatement(T C, const char *sql,...)</div><div class="ttdoc">Prepares a SQL statement for execution.</div></div>
<div class="ttc" id="aPreparedStatement_8h_html_a618654d179459a9394828a4117f97d05"><div class="ttname"><a href="#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a></div><div class="ttdeci">void PreparedStatement_setString(T P, int parameterIndex, const char *x)</div><div class="ttdoc">Sets the in parameter at index parameterIndex to the given string value.</div></div>
<div class="ttc" id="aPreparedStatement_8h_html_a6f0eb01daec7f61bf92707b7de0a246f"><div class="ttname"><a href="#a6f0eb01daec7f61bf92707b7de0a246f">PreparedStatement_execute</a></div><div class="ttdeci">void PreparedStatement_execute(T P)</div><div class="ttdoc">Executes the prepared SQL statement.</div></div>
<div class="ttc" id="aPreparedStatement_8h_html_ac19d3cb5e6ee2222c1320f9aee7547ff"><div class="ttname"><a href="#ac19d3cb5e6ee2222c1320f9aee7547ff">PreparedStatement_setBlob</a></div><div class="ttdeci">void PreparedStatement_setBlob(T P, int parameterIndex, const void *x, int size)</div><div class="ttdoc">Sets the in parameter at index parameterIndex to the given blob value.</div></div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md18"></a>
Reuse</h2>
<p>A PreparedStatement can be reused. That is, the method <a class="el" href="#a6f0eb01daec7f61bf92707b7de0a246f" title="Executes the prepared SQL statement.">PreparedStatement_execute()</a> can be called one or more times to execute the same statement. Clients can also set new <em>in</em> parameter values and re-execute the statement as shown in this example:</p>
<div class="fragment"><div class="line">PreparedStatement_T p = <a class="code hl_function" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5">Connection_prepareStatement</a>(con, <span class="stringliteral">&quot;INSERT INTO employee(name, photo) VALUES(?, ?)&quot;</span>);</div>
<div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; employees[i]; i++)</div>
<div class="line">{</div>
<div class="line">       <a class="code hl_function" href="#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a>(p, 1, employees[i].name);</div>
<div class="line">       <a class="code hl_function" href="#ac19d3cb5e6ee2222c1320f9aee7547ff">PreparedStatement_setBlob</a>(p, 2, employees[i].photo.data, employees[i].photo.size);</div>
<div class="line">       <a class="code hl_function" href="#a6f0eb01daec7f61bf92707b7de0a246f">PreparedStatement_execute</a>(p);</div>
<div class="line">}</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md19"></a>
Result Sets</h2>
<p>Here is another example where we use a Prepared Statement to execute a query which returns a Result Set:</p>
<div class="fragment"><div class="line">PreparedStatement_T p = <a class="code hl_function" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5">Connection_prepareStatement</a>(con, <span class="stringliteral">&quot;SELECT id FROM employee WHERE name LIKE ?&quot;</span>);</div>
<div class="line"><a class="code hl_function" href="#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a>(p, 1, <span class="stringliteral">&quot;%oru%&quot;</span>);</div>
<div class="line">ResultSet_T r = <a class="code hl_function" href="#a3e33ed8289ac8b8b11438b009a169e63">PreparedStatement_executeQuery</a>(p);</div>
<div class="line"><span class="keywordflow">while</span> (<a class="code hl_function" href="ResultSet_8h.html#a771894bb8c0ddfd90ed6ed9c9c3e46b3">ResultSet_next</a>(r))</div>
<div class="line">       printf(<span class="stringliteral">&quot;employee.id = %d\n&quot;</span>, <a class="code hl_function" href="ResultSet_8h.html#aa73672053b34ee50c21eac0783b28719">ResultSet_getInt</a>(r, 1));</div>
<div class="ttc" id="aPreparedStatement_8h_html_a3e33ed8289ac8b8b11438b009a169e63"><div class="ttname"><a href="#a3e33ed8289ac8b8b11438b009a169e63">PreparedStatement_executeQuery</a></div><div class="ttdeci">ResultSet_T PreparedStatement_executeQuery(T P)</div><div class="ttdoc">Executes the prepared SQL query.</div></div>
<div class="ttc" id="aResultSet_8h_html_a771894bb8c0ddfd90ed6ed9c9c3e46b3"><div class="ttname"><a href="ResultSet_8h.html#a771894bb8c0ddfd90ed6ed9c9c3e46b3">ResultSet_next</a></div><div class="ttdeci">bool ResultSet_next(T R)</div><div class="ttdoc">Moves the cursor to the next row.</div></div>
<div class="ttc" id="aResultSet_8h_html_aa73672053b34ee50c21eac0783b28719"><div class="ttname"><a href="ResultSet_8h.html#aa73672053b34ee50c21eac0783b28719">ResultSet_getInt</a></div><div class="ttdeci">int ResultSet_getInt(T R, int columnIndex)</div><div class="ttdoc">Gets the designated column's value as an int.</div></div>
</div><!-- fragment --><p>A ResultSet returned from <a class="el" href="#a3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL query.">PreparedStatement_executeQuery()</a> is valid until the Prepared Statement is executed again or until the Connection is returned to the Connection Pool.</p>
<h2><a class="anchor" id="autotoc_md20"></a>
Date and Time</h2>
<p><a class="el" href="#a3cf4d848d41a7901727bccac2b58d31c" title="Sets the in parameter at index parameterIndex to the given Unix timestamp value.">PreparedStatement_setTimestamp()</a> can be used to set a Unix timestamp value as a <code>time_t</code> type. To set Date, Time or DateTime values, simply use <a class="el" href="#a618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value.">PreparedStatement_setString()</a> to set a time string in a format understood by your database. For instance to set a SQL Date value,, </p><div class="fragment"><div class="line"><a class="code hl_function" href="#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a>(p, parameterIndex, <span class="stringliteral">&quot;2019-12-28&quot;</span>);</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md21"></a>
SQL Injection Prevention</h2>
<p>Prepared Statement is particularly useful when dealing with user-submitted data, as properly used Prepared Statements provide strong protection against SQL injection attacks. By separating SQL logic from data, PreparedStatements ensure that user input is treated as data only, not as part of the SQL command.</p>
<p><em>A PreparedStatement is reentrant, but not thread-safe and should only be used by one thread (at a time).</em></p>
<dl class="section note"><dt>Note</dt><dd>Remember that parameter indices in PreparedStatement are 1-based, not 0-based.</dd>
<dd>
To minimizes memory allocation and avoid unnecessary data copying, string and blob values are set by reference and MUST remain valid until either <a class="el" href="#a6f0eb01daec7f61bf92707b7de0a246f" title="Executes the prepared SQL statement.">PreparedStatement_execute()</a> or <a class="el" href="#a3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL query.">PreparedStatement_executeQuery()</a> is called.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="Connection_8h.html" title="A Connection represents a connection to a SQL database system.">Connection.h</a> <a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set.">ResultSet.h</a> <a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5" id="r_a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;PreparedStatement_T</td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a9e5cf7eed5e2233d2e8e90a70d1e0f77" id="r_a9e5cf7eed5e2233d2e8e90a70d1e0f77"><td class="memItemLeft" align="right" valign="top">typedef struct PreparedStatement_S *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9e5cf7eed5e2233d2e8e90a70d1e0f77">T</a></td></tr>
<tr class="separator:a9e5cf7eed5e2233d2e8e90a70d1e0f77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Parameters</div></td></tr>
<tr class="memitem:a618654d179459a9394828a4117f97d05" id="r_a618654d179459a9394828a4117f97d05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, const char *x)</td></tr>
<tr class="memdesc:a618654d179459a9394828a4117f97d05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given string value.  <br /></td></tr>
<tr class="separator:a618654d179459a9394828a4117f97d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05d27fb3138e041d4c79c3692d795164" id="r_a05d27fb3138e041d4c79c3692d795164"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a05d27fb3138e041d4c79c3692d795164">PreparedStatement_setSString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, const char *x, int size)</td></tr>
<tr class="memdesc:a05d27fb3138e041d4c79c3692d795164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given <code>sized</code> string value.  <br /></td></tr>
<tr class="separator:a05d27fb3138e041d4c79c3692d795164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350056fea6744da297b674bfbe1ee94e" id="r_a350056fea6744da297b674bfbe1ee94e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a350056fea6744da297b674bfbe1ee94e">PreparedStatement_setInt</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, int x)</td></tr>
<tr class="memdesc:a350056fea6744da297b674bfbe1ee94e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given int value.  <br /></td></tr>
<tr class="separator:a350056fea6744da297b674bfbe1ee94e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8e3eafb030f466356edc9bdffae841a" id="r_ac8e3eafb030f466356edc9bdffae841a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac8e3eafb030f466356edc9bdffae841a">PreparedStatement_setLLong</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, long long x)</td></tr>
<tr class="memdesc:ac8e3eafb030f466356edc9bdffae841a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given long long value.  <br /></td></tr>
<tr class="separator:ac8e3eafb030f466356edc9bdffae841a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a023adeb93e4ff455d57a9a5be8d1e26f" id="r_a023adeb93e4ff455d57a9a5be8d1e26f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a023adeb93e4ff455d57a9a5be8d1e26f">PreparedStatement_setDouble</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, double x)</td></tr>
<tr class="memdesc:a023adeb93e4ff455d57a9a5be8d1e26f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given double value.  <br /></td></tr>
<tr class="separator:a023adeb93e4ff455d57a9a5be8d1e26f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac19d3cb5e6ee2222c1320f9aee7547ff" id="r_ac19d3cb5e6ee2222c1320f9aee7547ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac19d3cb5e6ee2222c1320f9aee7547ff">PreparedStatement_setBlob</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, const void *x, int size)</td></tr>
<tr class="memdesc:ac19d3cb5e6ee2222c1320f9aee7547ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given blob value.  <br /></td></tr>
<tr class="separator:ac19d3cb5e6ee2222c1320f9aee7547ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf4d848d41a7901727bccac2b58d31c" id="r_a3cf4d848d41a7901727bccac2b58d31c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3cf4d848d41a7901727bccac2b58d31c">PreparedStatement_setTimestamp</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, time_t x)</td></tr>
<tr class="memdesc:a3cf4d848d41a7901727bccac2b58d31c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given Unix timestamp value.  <br /></td></tr>
<tr class="separator:a3cf4d848d41a7901727bccac2b58d31c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaa4163d1a916f8943ccf722a83d5b20" id="r_afaa4163d1a916f8943ccf722a83d5b20"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afaa4163d1a916f8943ccf722a83d5b20">PreparedStatement_setNull</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex)</td></tr>
<tr class="memdesc:afaa4163d1a916f8943ccf722a83d5b20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to SQL NULL.  <br /></td></tr>
<tr class="separator:afaa4163d1a916f8943ccf722a83d5b20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Functions</div></td></tr>
<tr class="memitem:a6f0eb01daec7f61bf92707b7de0a246f" id="r_a6f0eb01daec7f61bf92707b7de0a246f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6f0eb01daec7f61bf92707b7de0a246f">PreparedStatement_execute</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:a6f0eb01daec7f61bf92707b7de0a246f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the prepared SQL statement.  <br /></td></tr>
<tr class="separator:a6f0eb01daec7f61bf92707b7de0a246f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e33ed8289ac8b8b11438b009a169e63" id="r_a3e33ed8289ac8b8b11438b009a169e63"><td class="memItemLeft" align="right" valign="top">ResultSet_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3e33ed8289ac8b8b11438b009a169e63">PreparedStatement_executeQuery</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:a3e33ed8289ac8b8b11438b009a169e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the prepared SQL query.  <br /></td></tr>
<tr class="separator:a3e33ed8289ac8b8b11438b009a169e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaaec0e14c95b70b342dff0cf604cadd" id="r_aaaaec0e14c95b70b342dff0cf604cadd"><td class="memItemLeft" align="right" valign="top">long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aaaaec0e14c95b70b342dff0cf604cadd">PreparedStatement_rowsChanged</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:aaaaec0e14c95b70b342dff0cf604cadd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of rows affected by the most recent SQL statement.  <br /></td></tr>
<tr class="separator:aaaaec0e14c95b70b342dff0cf604cadd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr class="memitem:ace45c650c6146570da0067a7329edc09" id="r_ace45c650c6146570da0067a7329edc09"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ace45c650c6146570da0067a7329edc09">PreparedStatement_getParameterCount</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:ace45c650c6146570da0067a7329edc09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of parameters in the prepared statement.  <br /></td></tr>
<tr class="separator:ace45c650c6146570da0067a7329edc09"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a0acb682b8260ab1c60b918599864e2e5" name="a0acb682b8260ab1c60b918599864e2e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0acb682b8260ab1c60b918599864e2e5">&#9670;&#160;</a></span>T</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;&#160;&#160;PreparedStatement_T</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a9e5cf7eed5e2233d2e8e90a70d1e0f77" name="a9e5cf7eed5e2233d2e8e90a70d1e0f77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e5cf7eed5e2233d2e8e90a70d1e0f77">&#9670;&#160;</a></span>T</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct PreparedStatement_S* <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a618654d179459a9394828a4117f97d05" name="a618654d179459a9394828a4117f97d05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a618654d179459a9394828a4117f97d05">&#9670;&#160;</a></span>PreparedStatement_setString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>x</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given string value. </p>
<p>This method is less efficient than <a class="el" href="#a05d27fb3138e041d4c79c3692d795164" title="Sets the in parameter at index parameterIndex to the given sized string value.">PreparedStatement_setSString()</a> as it needs to calculate the string length. Use <a class="el" href="#a05d27fb3138e041d4c79c3692d795164" title="Sets the in parameter at index parameterIndex to the given sized string value.">PreparedStatement_setSString()</a> if you know the size of the string.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2, ... </td></tr>
    <tr><td class="paramname">x</td><td>The string value to set. The string must be a '\0' terminated C-string. NULL is allowed to indicate a SQL NULL value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd>
<dd>
<a class="el" href="#a05d27fb3138e041d4c79c3692d795164" title="Sets the in parameter at index parameterIndex to the given sized string value.">PreparedStatement_setSString</a> </dd></dl>

</div>
</div>
<a id="a05d27fb3138e041d4c79c3692d795164" name="a05d27fb3138e041d4c79c3692d795164"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05d27fb3138e041d4c79c3692d795164">&#9670;&#160;</a></span>PreparedStatement_setSString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setSString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>x</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>size</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given <code>sized</code> string value. </p>
<p>This method is more efficient than <a class="el" href="#a618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value.">PreparedStatement_setString()</a> as it doesn't need to calculate the string length.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2, ... </td></tr>
    <tr><td class="paramname">x</td><td>The string value to set. The string need not be '\0' terminated. NULL is allowed to indicate a SQL NULL value. </td></tr>
    <tr><td class="paramname">size</td><td>The length of the byte string. For instance, the value returned by <code>strlen(3)</code>. If size is negative, it will be treated as 0. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd>
<dd>
<a class="el" href="#a618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value.">PreparedStatement_setString</a> </dd></dl>

</div>
</div>
<a id="a350056fea6744da297b674bfbe1ee94e" name="a350056fea6744da297b674bfbe1ee94e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a350056fea6744da297b674bfbe1ee94e">&#9670;&#160;</a></span>PreparedStatement_setInt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setInt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>x</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given int value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The int value to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="ac8e3eafb030f466356edc9bdffae841a" name="ac8e3eafb030f466356edc9bdffae841a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8e3eafb030f466356edc9bdffae841a">&#9670;&#160;</a></span>PreparedStatement_setLLong()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setLLong </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long long</td>          <td class="paramname"><span class="paramname"><em>x</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given long long value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The long long value to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="a023adeb93e4ff455d57a9a5be8d1e26f" name="a023adeb93e4ff455d57a9a5be8d1e26f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a023adeb93e4ff455d57a9a5be8d1e26f">&#9670;&#160;</a></span>PreparedStatement_setDouble()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setDouble </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double</td>          <td class="paramname"><span class="paramname"><em>x</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given double value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The double value to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="ac19d3cb5e6ee2222c1320f9aee7547ff" name="ac19d3cb5e6ee2222c1320f9aee7547ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac19d3cb5e6ee2222c1320f9aee7547ff">&#9670;&#160;</a></span>PreparedStatement_setBlob()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setBlob </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *</td>          <td class="paramname"><span class="paramname"><em>x</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>size</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given blob value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The blob value to set. NULL is allowed to indicate a SQL NULL value </td></tr>
    <tr><td class="paramname">size</td><td>The number of bytes in the blob. If size is negative, it will be treated as 0. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="a3cf4d848d41a7901727bccac2b58d31c" name="a3cf4d848d41a7901727bccac2b58d31c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cf4d848d41a7901727bccac2b58d31c">&#9670;&#160;</a></span>PreparedStatement_setTimestamp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setTimestamp </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t</td>          <td class="paramname"><span class="paramname"><em>x</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given Unix timestamp value. </p>
<p>The timestamp value given in <code>x</code> is expected to be a UTC timestamp, representing the number of seconds since the Unix epoch, regardless of the system's local timezone. For instance, a value returned by <code>time(3)</code> is appropriate for this parameter.</p>
<p>Note on database-specific behavior:</p><ul>
<li>SQLite: Stores the time_t value as a 64-bit integer. This preserves the exact UTC timestamp, which can be correctly interpreted in any timezone when retrieved.</li>
<li>MySQL, PostgreSQL and Oracle: Convert and store the timestamp in their respective datetime formats, preserving the UTC value.</li>
</ul>
<p>This approach ensures consistent timestamp handling across different timezones and database systems. When retrieving the timestamp, use appropriate time conversion functions to interpret the value in the desired timezone.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2, ... </td></tr>
    <tr><td class="paramname">x</td><td>The UTC timestamp value to set. E.g., a value returned by time(3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd>
<dd>
<a class="el" href="ResultSet_8h.html#a073df52b04dfbaaaf088baede0f770f5" title="Gets the designated column&#39;s value as a Unix timestamp.">ResultSet_getTimestamp</a> </dd></dl>

</div>
</div>
<a id="afaa4163d1a916f8943ccf722a83d5b20" name="afaa4163d1a916f8943ccf722a83d5b20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaa4163d1a916f8943ccf722a83d5b20">&#9670;&#160;</a></span>PreparedStatement_setNull()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setNull </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>parameterIndex</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to SQL NULL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="a6f0eb01daec7f61bf92707b7de0a246f" name="a6f0eb01daec7f61bf92707b7de0a246f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f0eb01daec7f61bf92707b7de0a246f">&#9670;&#160;</a></span>PreparedStatement_execute()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_execute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the prepared SQL statement. </p>
<p>Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="a3e33ed8289ac8b8b11438b009a169e63" name="a3e33ed8289ac8b8b11438b009a169e63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e33ed8289ac8b8b11438b009a169e63">&#9670;&#160;</a></span>PreparedStatement_executeQuery()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ResultSet_T PreparedStatement_executeQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the prepared SQL query. </p>
<p>Executes the prepared SQL statement, which returns a single ResultSet object. A ResultSet is valid until the next call to a PreparedStatement method or until the Connection is returned to the Connection Pool. <em>This means that Result Sets cannot be saved between queries</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A ResultSet object that contains the data produced by the prepared statement. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set.">ResultSet.h</a> </dd>
<dd>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div>
<a id="aaaaec0e14c95b70b342dff0cf604cadd" name="aaaaec0e14c95b70b342dff0cf604cadd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaaaec0e14c95b70b342dff0cf604cadd">&#9670;&#160;</a></span>PreparedStatement_rowsChanged()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long PreparedStatement_rowsChanged </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the number of rows affected by the most recent SQL statement. </p>
<p>If used with a transaction, this method should be called <em>before</em> commit is executed, otherwise 0 is returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of rows changed by the last (DIM) SQL statement </dd></dl>

</div>
</div>
<a id="ace45c650c6146570da0067a7329edc09" name="ace45c650c6146570da0067a7329edc09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace45c650c6146570da0067a7329edc09">&#9670;&#160;</a></span>PreparedStatement_getParameterCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PreparedStatement_getParameterCount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>          <td class="paramname"><span class="paramname"><em>P</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the number of parameters in the prepared statement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of <em>in</em> parameters in this prepared statement </dd></dl>

</div>
</div>
</div><!-- contents -->
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; <a href="https://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>