1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_XOutParameters_idl__
28 #define __com_sun_star_sdbc_XOutParameters_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_sdbc_SQLException_idl__
35 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
38 module com
{ module sun
{ module star
{ module sdbc
{
41 /** is used to register Out-Parameters for stored procedures.
45 SDBC provides a stored procedure SQL escape that allows stored procedures
46 to be called in a standard way for all RDBMSs. This escape syntax has one
47 form that includes a result parameter and one that does not. If used, the
48 result parameter must be registered as an OUT parameter. The other parameters
49 can be used for input, output, or both. Parameters are referred to sequentially,
50 by number. The first parameter is 1.
53 published
interface XOutParameters
: com
::sun
::star
::uno
::XInterface
56 /** registers the designated output parameter. This version of
58 <member scope="com::sun::star::sdbc">XOutParameters::registerOutParameter()</member>
59 should be used for a user-named or REF output parameter. Examples
60 of user-named types include: STRUCT, DISTINCT, OBJECT, and named array
65 Before executing a stored procedure call, you must explicitly
67 <member scope="com::sun::star::sdbc">XOutParameters::registerOutParameter()</member>
68 to register the type from
69 <type scope="com::sun::star::sdbc">DataType</type>
70 for each OUT parameter.
72 For a user-named parameter the fully-qualified SQL type name of the
73 parameter should also be given, while a REF parameter requires that the
74 fully-qualified type name of the referenced type be given.
75 An SDBC driver that does not need the type code and type name information
76 may ignore it. To be portable, however, applications should always provide
77 these values for user-named and REF parameters.
79 <p>Although it is intended for user-named and REF parameters,
80 this method may be used to register a parameter of any SDBC type.
81 If the parameter does not have a user-named or REF type, the
82 typeName parameter is ignored.
85 <b>Note:</b> When reading the value of an out parameter, you
88 method whose type XXX corresponds to the
89 parameter's registered SQL type.
92 the first parameter is 1, the second is 2, ...
94 the type of the column to register
98 if a database access error occurs.
100 void registerOutParameter
([in]long parameterIndex
, [in]long sqlType
,
102 raises
(SQLException
);
103 //-------------------------------------------------------------------------
105 /** registers the OUT parameter in ordinal position
106 <code>parameterIndex</code>
110 OUT parameters must be registered before a stored procedure is executed.
114 The SDBC type specified by
116 for an OUT parameter determines the type that must be used in the
118 method to read the value of that parameter.
120 <member scope="com::sun::star::sdbc">XOutParameters::registerOutParameter()</member>
122 used when the parameter is of SDBC type
123 <member scope="com::sun::star::sdbc">DataType::NUMERIC</member>
125 <member scope="com::sun::star::sdbc">DataType::DECIMAL</member>
127 @param parameterIndex
128 the first parameter is 1, the second is 2, ...
130 the type of the column to register
132 the scale of the type
134 if a database access error occurs.
137 void registerNumericOutParameter
([in]long parameterIndex
, [in]long sqlType
,
139 raises
(SQLException
);
142 //=============================================================================
146 /*===========================================================================
147 ===========================================================================*/