Difference between revisions of "Documentation/DevGuide/Database/Retrieving Values from Result Sets"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial author Sun Microsystems, Inc.)
 
 
(5 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/Database/Moving the Result Set Cursor
 
|NextPage=Documentation/DevGuide/Database/Moving the Result Set Cursor
 
}}
 
}}
{{DISPLAYTITLE:Retrieving Values from Result Sets}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Database/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Retrieving Values from Result Sets}}
 
A call to <code>execute()</code> on a <idl>com.sun.star.sdb.RowSet</idl> or a call to <code>executeQuery()</code> on a Statement produces a <idl>com.sun.star.sdb.ResultSet</idl>.  
 
A call to <code>execute()</code> on a <idl>com.sun.star.sdb.RowSet</idl> or a call to <code>executeQuery()</code> on a Statement produces a <idl>com.sun.star.sdb.ResultSet</idl>.  
 
<!--[SOURCE:Database/Sales.java]-->
 
<!--[SOURCE:Database/Sales.java]-->
 
+
<syntaxhighlight lang="java">
 
   com.sun.star.sdbc.XResultSet xResult = xStatement.executeQuery("SELECT FIRSTNAME, LASTNAME, STREET " +  
 
   com.sun.star.sdbc.XResultSet xResult = xStatement.executeQuery("SELECT FIRSTNAME, LASTNAME, STREET " +  
 
       "FROM SALESMAN " +  
 
       "FROM SALESMAN " +  
 
       "VWHERE BIRTHDATE < '1950-01-01'");
 
       "VWHERE BIRTHDATE < '1950-01-01'");
 +
</syntaxhighlight>
 +
{{PDL1}}
  
{{PDL1}}
+
[[Category:Documentation/Developer's Guide/Database Access]]
[[Category: Database Access]]
+

Latest revision as of 14:42, 21 December 2020



A call to execute() on a com.sun.star.sdb.RowSet or a call to executeQuery() on a Statement produces a com.sun.star.sdb.ResultSet.

  com.sun.star.sdbc.XResultSet xResult = xStatement.executeQuery("SELECT FIRSTNAME, LASTNAME, STREET " + 
      "FROM SALESMAN " + 
      "VWHERE BIRTHDATE < '1950-01-01'");
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages