-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathodbc-binmode.xml
More file actions
133 lines (132 loc) · 4.27 KB
/
odbc-binmode.xml
File metadata and controls
133 lines (132 loc) · 4.27 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- splitted from ./it/functions/uodbc.xml, last change in rev 1.10 -->
<!-- last change to 'odbc-binmode' in en/ tree in rev 1.2 -->
<!-- EN-Revision: n/a Maintainer: darvina Status: ready -->
<!-- OLD-Revision: 1.39/EN.1.2 -->
<refentry xml:id="function.odbc-binmode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>odbc_binmode</refname>
<refpurpose>Gestione delle colonne di dati binari</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>bool</type><methodname>odbc_binmode</methodname>
<methodparam><type>resource</type><parameter>id_risultato</parameter></methodparam>
<methodparam><type>int</type><parameter>modalità</parameter></methodparam>
</methodsynopsis>
<para>
(Tipi di campi ODBC SQL coinvolti: BINARY, VARBINARY, LONGVARBINARY)
</para>
<itemizedlist>
<listitem>
<simpara>
ODBC_BINMODE_PASSTHRU: Restituzione del dato binario direttamente al client
</simpara>
</listitem>
<listitem>
<simpara>
ODBC_BINMODE_RETURN: restituisce il dato inalterato
</simpara>
</listitem>
<listitem>
<simpara>
ODBC_BINMODE_CONVERT: Conversione in char
</simpara>
</listitem>
</itemizedlist>
<para>
Quando si esegue la conversione da dati binari SQL a dati di tipo char del C,
ciascun byte ( 8 bits) dei dati sorgenti vengono rappresentati da 2 caratteri ASCII.
Questi caratteri sono la rappresentazione ASCII dei numeri nella
loro forma esadecimale. Ad esempio, il valore binario 00000001 è
convertito in <literal>"01"</literal> e il valore binario 11111111 è
convertito come <literal>"FF"</literal>.
<table>
<title>Gestione del tipo LONGVARBINARY </title>
<tgroup cols="3">
<thead>
<row>
<entry>Modalità</entry>
<entry>Impostazione di longreadlen</entry>
<entry>Comportamento</entry>
</row>
</thead>
<tbody>
<row>
<entry>ODBC_BINMODE_PASSTHRU</entry>
<entry>0</entry>
<entry>direttamente al client</entry>
</row>
<row>
<entry>ODBC_BINMODE_RETURN</entry>
<entry>0</entry>
<entry>direttamente al client</entry>
</row>
<row>
<entry>ODBC_BINMODE_CONVERT</entry>
<entry>0</entry>
<entry>direttamente al client</entry>
</row>
<row>
<entry>ODBC_BINMODE_PASSTHRU</entry>
<entry>0</entry>
<entry>passthru</entry>
</row>
<row>
<entry>ODBC_BINMODE_PASSTHRU</entry>
<entry>>0</entry>
<entry>direttamente al client</entry>
</row>
<row>
<entry>ODBC_BINMODE_RETURN</entry>
<entry>>0</entry>
<entry>restituito inalterato</entry>
</row>
<row>
<entry>ODBC_BINMODE_CONVERT</entry>
<entry>>0</entry>
<entry>restituito come char</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
Se viene utilizzata <function>odbc_fetch_into</function>, nei casi in cui il dato viene inviato direttamente al client, quest'ultima
restituisce una stringa vuota per le colonne binarie.
</para>
<para>
Se l'argomento <parameter>id_risultato</parameter> è valorizzato a <literal>0</literal>,
il settaggio viene applicato come default per i nuovi risultati.
<note>
<simpara>
I valori di default per longreadlen è <literal>4096</literal>, mentre la modalità di
default è <literal>ODBC_BINMODE_RETURN</literal>. La gestione delle colonne
di campi long binary, è anche gestita dalla funzione
<function>odbc_longreadlen</function>
</simpara>
</note>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->