Difference between revisions of "Documentation/DevGuide/Database/Queries"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
m
Line 11: Line 11:
 
A <idl>com.sun.star.sdb.QueryDefinition</idl> encapsulates a definition of an SQL statement stored in {{PRODUCTNAME}} API. It is similar to a view or a stored procedure, because it can be reused, and executed and altered by the user in the GUI. It is possible to run a <code>QueryDefinition</code> against a different database by changing the underlying <code>DataSource</code> properties. It can also be created without being connected to a database.
 
A <idl>com.sun.star.sdb.QueryDefinition</idl> encapsulates a definition of an SQL statement stored in {{PRODUCTNAME}} API. It is similar to a view or a stored procedure, because it can be reused, and executed and altered by the user in the GUI. It is possible to run a <code>QueryDefinition</code> against a different database by changing the underlying <code>DataSource</code> properties. It can also be created without being connected to a database.
  
The purpose of the query services available at a <code>DataSource</code> is to define and edit queries. The query services by themselves do not offer methods to execute queries. To open a query, use a <idl>com.sun.star.sdb.RowSet</idl> service or the <idl>com.sun.star.sdb.XCommandPreparation</idl> interface of a connection. See the sections [[Documentation/DevGuide/Database/The RowSet Service|The RowSet Serivce]] and [[Documentation/DevGuide/Database/PreparedStatement From DataSource Queries|PreparedStatement From DataSource Queries]] for additional details.
+
The purpose of the query services available at a <code>DataSource</code> is to define and edit queries. The query services by themselves do not offer methods to execute queries. To open a query, use a <idl>com.sun.star.sdb.RowSet</idl> service or the <idl>com.sun.star.sdb.XCommandPreparation</idl> interface of a connection. See the sections [[Documentation/DevGuide/Database/The RowSet Service|The RowSet Service]] and [[Documentation/DevGuide/Database/PreparedStatement From DataSource Queries|PreparedStatement From DataSource Queries]] for additional details.
  
 
{{PDL1}}
 
{{PDL1}}
 
[[Category: Database Access]]
 
[[Category: Database Access]]

Revision as of 20:15, 14 April 2008



A com.sun.star.sdb.QueryDefinition encapsulates a definition of an SQL statement stored in OpenOffice.org API. It is similar to a view or a stored procedure, because it can be reused, and executed and altered by the user in the GUI. It is possible to run a QueryDefinition against a different database by changing the underlying DataSource properties. It can also be created without being connected to a database.

The purpose of the query services available at a DataSource is to define and edit queries. The query services by themselves do not offer methods to execute queries. To open a query, use a com.sun.star.sdb.RowSet service or the com.sun.star.sdb.XCommandPreparation interface of a connection. See the sections The RowSet Service and PreparedStatement From DataSource Queries for additional details.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools