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_XResultSetUpdate_idl__
28 #define __com_sun_star_sdbc_XResultSetUpdate_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 /** provides the possiblity to write changes made on a result set back to
44 published
interface XResultSetUpdate
: com
::sun
::star
::uno
::XInterface
46 //-------------------------------------------------------------------------
48 /** inserts the contents of the insert row into the result set and
49 the database. Must be on the insert row when this method is called.
51 if a database access error occurs.
53 void insertRow
() raises
(SQLException
);
54 //-------------------------------------------------------------------------
56 /** updates the underlying database with the new contents of the
57 current row. Cannot be called when on the insert row.
59 if a database access error occurs.
61 void updateRow
() raises
(SQLException
);
62 //-------------------------------------------------------------------------
64 /** deletes the current row from the result set and the underlying
65 database. Cannot be called when on the insert row.
67 if a database access error occurs.
69 void deleteRow
() raises
(SQLException
);
70 //-------------------------------------------------------------------------
72 /** cancels the updates made to a row.
76 This method may be called after calling an
77 <code>updateXXX</code>
78 method(s) and before calling
79 <member scope="com::sun::star::sdbc">XResultSetUpdate::updateRow()</member>
80 to rollback the updates made to a row. If no updates have been made or
81 <code>updateRow</code>
82 has already been called, then this method has no
86 if a database access error occurs.
88 void cancelRowUpdates
() raises
(SQLException
);
89 //-------------------------------------------------------------------------
91 /** moves the cursor to the insert row. The current cursor position is
92 remembered while the cursor is positioned on the insert row.
96 The insert row is a special row associated with an updatable
97 result set. It is essentially a buffer where a new row may
98 be constructed by calling the
99 <code>updateXXX</code>
101 inserting the row into the result set.
105 <code>updateXXX</code>
110 <member scope="com::sun::star::sdbc">XResultSetUpdate::insertRow()</member>
112 called when the cursor is on the insert row. All of the columns in
113 a result set must be given a value each time this method is
114 called before calling
115 <code>insertRow</code>
117 <code>updateXXX</code>
118 must be called before a
120 method can be called on a column value.
123 if a database access error occurs.
125 void moveToInsertRow
() raises
(SQLException
);
126 //-------------------------------------------------------------------------
128 /** moves the cursor to the remembered cursor position, usually the
129 current row. This method has no effect if the cursor is not on the insert
132 if a database access error occurs.
134 void moveToCurrentRow
() raises
(SQLException
);
137 //=============================================================================
141 /*===========================================================================
142 ===========================================================================*/