1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
{ module sun
{ module star
{ module sdbc
{
23 /** is used to register Out-Parameters for stored procedures.
27 SDBC provides a stored procedure SQL escape that allows stored procedures
28 to be called in a standard way for all RDBMSs. This escape syntax has one
29 form that includes a result parameter and one that does not. If used, the
30 result parameter must be registered as an OUT parameter. The other parameters
31 can be used for input, output, or both. Parameters are referred to sequentially,
32 by number. The first parameter is 1.
35 published
interface XOutParameters
: com
::sun
::star
::uno
::XInterface
38 /** registers the designated output parameter. This version of
40 com::sun::star::sdbc::XOutParameters::registerOutParameter()
41 should be used for a user-named or REF output parameter. Examples
42 of user-named types include: STRUCT, DISTINCT, OBJECT, and named array
46 Before executing a stored procedure call, you must explicitly
48 com::sun::star::sdbc::XOutParameters::registerOutParameter()
49 to register the type from
50 com::sun::star::sdbc::DataType
51 for each OUT parameter.
53 For a user-named parameter the fully-qualified SQL type name of the
54 parameter should also be given, while a REF parameter requires that the
55 fully-qualified type name of the referenced type be given.
56 An SDBC driver that does not need the type code and type name information
57 may ignore it. To be portable, however, applications should always provide
58 these values for user-named and REF parameters.
60 <p>Although it is intended for user-named and REF parameters,
61 this method may be used to register a parameter of any SDBC type.
62 If the parameter does not have a user-named or REF type, the
63 typeName parameter is ignored.
66 <b>Note:</b> When reading the value of an out parameter, you
69 method whose type XXX corresponds to the
70 parameter's registered SQL type.
73 the first parameter is 1, the second is 2, ...
75 the type of the column to register
79 if a database access error occurs.
81 void registerOutParameter
([in]long parameterIndex
, [in]long sqlType
,
83 raises
(SQLException
);
85 /** registers the OUT parameter in ordinal position
86 <code>parameterIndex</code>
87 to the SDBC type <code>sqlType</code>. All
88 OUT parameters must be registered before a stored procedure is executed.
92 The SDBC type specified by
94 for an OUT parameter determines the type that must be used in the
96 method to read the value of that parameter.
98 com::sun::star::sdbc::XOutParameters::registerOutParameter()
100 used when the parameter is of SDBC type
101 com::sun::star::sdbc::DataType::NUMERIC
102 or com::sun::star::sdbc::DataType::DECIMAL.
103 @param parameterIndex
104 the first parameter is 1, the second is 2, ...
106 the type of the column to register
108 the scale of the type
110 if a database access error occurs.
113 void registerNumericOutParameter
([in]long parameterIndex
, [in]long sqlType
,
115 raises
(SQLException
);
121 /*===========================================================================
122 ===========================================================================*/
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */