1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XOutParameters.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdbc_XOutParameters_idl__
31 #define __com_sun_star_sdbc_XOutParameters_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_sdbc_SQLException_idl__
38 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
41 module com
{ module sun
{ module star
{ module sdbc
{
44 /** is used to register Out-Parameters for stored procedures.
48 SDBC provides a stored procedure SQL escape that allows stored procedures
49 to be called in a standard way for all RDBMSs. This escape syntax has one
50 form that includes a result parameter and one that does not. If used, the
51 result parameter must be registered as an OUT parameter. The other parameters
52 can be used for input, output, or both. Parameters are referred to sequentially,
53 by number. The first parameter is 1.
56 published
interface XOutParameters
: com
::sun
::star
::uno
::XInterface
59 /** registers the designated output parameter. This version of
61 <member scope="com::sun::star::sdbc">XOutParameters::registerOutParameter()</member>
62 should be used for a user-named or REF output parameter. Examples
63 of user-named types include: STRUCT, DISTINCT, OBJECT, and named array
68 Before executing a stored procedure call, you must explicitly
70 <member scope="com::sun::star::sdbc">XOutParameters::registerOutParameter()</member>
71 to register the type from
72 <type scope="com::sun::star::sdbc">DataType</type>
73 for each OUT parameter.
75 For a user-named parameter the fully-qualified SQL type name of the
76 parameter should also be given, while a REF parameter requires that the
77 fully-qualified type name of the referenced type be given.
78 An SDBC driver that does not need the type code and type name information
79 may ignore it. To be portable, however, applications should always provide
80 these values for user-named and REF parameters.
82 <p>Although it is intended for user-named and REF parameters,
83 this method may be used to register a parameter of any SDBC type.
84 If the parameter does not have a user-named or REF type, the
85 typeName parameter is ignored.
88 <b>Note:</b> When reading the value of an out parameter, you
91 method whose type XXX corresponds to the
92 parameter's registered SQL type.
95 the first parameter is 1, the second is 2, ...
97 the type of the column to register
101 if a database access error occurs.
103 void registerOutParameter
([in]long parameterIndex
, [in]long sqlType
,
105 raises
(SQLException
);
106 //-------------------------------------------------------------------------
108 /** registers the OUT parameter in ordinal position
109 <code>parameterIndex</code>
113 OUT parameters must be registered before a stored procedure is executed.
117 The SDBC type specified by
119 for an OUT parameter determines the type that must be used in the
121 method to read the value of that parameter.
123 <member scope="com::sun::star::sdbc">XOutParameters::registerOutParameter()</member>
125 used when the parameter is of SDBC type
126 <member scope="com::sun::star::sdbc">DataType::NUMERIC</member>
128 <member scope="com::sun::star::sdbc">DataType::DECIMAL</member>
130 @param parameterIndex
131 the first parameter is 1, the second is 2, ...
133 the type of the column to register
135 the scale of the type
137 if a database access error occurs.
140 void registerNumericOutParameter
([in]long parameterIndex
, [in]long sqlType
,
142 raises
(SQLException
);
145 //=============================================================================
149 /*===========================================================================
150 ===========================================================================*/