1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir
30ba1032bSAndrew Rist<!--***********************************************************
4*657b916bSmseidel *
50ba1032bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
60ba1032bSAndrew Rist * or more contributor license agreements.  See the NOTICE file
70ba1032bSAndrew Rist * distributed with this work for additional information
80ba1032bSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
90ba1032bSAndrew Rist * to you under the Apache License, Version 2.0 (the
100ba1032bSAndrew Rist * "License"); you may not use this file except in compliance
110ba1032bSAndrew Rist * with the License.  You may obtain a copy of the License at
12*657b916bSmseidel *
130ba1032bSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
14*657b916bSmseidel *
150ba1032bSAndrew Rist * Unless required by applicable law or agreed to in writing,
160ba1032bSAndrew Rist * software distributed under the License is distributed on an
170ba1032bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
180ba1032bSAndrew Rist * KIND, either express or implied.  See the License for the
190ba1032bSAndrew Rist * specific language governing permissions and limitations
200ba1032bSAndrew Rist * under the License.
21*657b916bSmseidel *
220ba1032bSAndrew Rist ***********************************************************-->
230ba1032bSAndrew Rist
24cdf0e10cSrcweir<helpdocument version="1.0">
25cdf0e10cSrcweir<meta>
26cdf0e10cSrcweir<topic id="textsharedexplorerdatabasedabaadvpropgenxml" indexer="include" status="PUBLISH">
27cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Generated Values</title>
28cdf0e10cSrcweir<filename>/text/shared/explorer/database/dabaadvpropgen.xhp</filename>
29cdf0e10cSrcweir</topic>
30*657b916bSmseidel<comment>Advanced Properties dialog Generated values tab page</comment>
31cdf0e10cSrcweir</meta>
32cdf0e10cSrcweir<body>
33cdf0e10cSrcweir<section id="generated">
34cdf0e10cSrcweir<paragraph role="heading" id="par_idN10553" xml-lang="en-US" level="1" l10n="NEW"><link href="text/shared/explorer/database/dabaadvpropgen.xhp">Generated Values</link></paragraph>
35cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN10563" xml-lang="en-US" l10n="NEW">Specifies the options for automatically generated values for new data records.<comment>UFI: all text copied from shared\explorer\database\11020000.xhp</comment></paragraph>
36cdf0e10cSrcweir</section>
37cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN10578" xml-lang="en-US" l10n="NEW"><comment>how to get this: Edit Database AdvancedProp ??? I have no idea</comment></paragraph>
38cdf0e10cSrcweir<paragraph role="paragraph" id="par_id7684560" xml-lang="en-US" l10n="NEW">The availability of the following controls depends on the type of database:</paragraph>
39cdf0e10cSrcweir<paragraph role="heading" id="par_idN1058C" xml-lang="en-US" level="2" l10n="NEW">Retrieve generated values</paragraph>
40cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN10590" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Enables $[officename] support for auto-incremented data fields in the current ODBC or JDBC data source. Select this option if the auto-increment feature in the SDBCX layer of the database is not supported. In general<comment>UFI: this does not mean that something is set by default, but "normally,"</comment>, the auto-increment is selected for the primary key field.</ahelp></paragraph>
41cdf0e10cSrcweir<paragraph role="heading" id="par_idN10593" xml-lang="en-US" level="2" l10n="NEW">Auto-increment statement</paragraph>
42cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN10597" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Enter the SQL command specifier that instructs the data source to auto-increment a specified Integer data field.</ahelp> For example, the following MySQL statement used the AUTO_INCREMENT statement to increase the "id" field each time the statement creates a data field:</paragraph>
43cdf0e10cSrcweir<paragraph role="code" id="par_idN105A0" xml-lang="en-US" l10n="NEW">CREATE TABLE "table1" ("id" INTEGER AUTO_INCREMENT)</paragraph>
44cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN10634" xml-lang="en-US" l10n="CHG">For this example, you must enter AUTO_INCREMENT into the <emph>Auto-increment statement</emph> box.</paragraph>
45cdf0e10cSrcweir<paragraph role="heading" id="par_idN105AA" xml-lang="en-US" level="2" l10n="NEW">Query of generated values</paragraph>
46cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN10645" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Enter an SQL statement that returns the last auto-incremented value for the primary key data field.</ahelp> For example:</paragraph>
47cdf0e10cSrcweir<paragraph role="code" id="par_idN105B1" xml-lang="en-US" l10n="NEW">SELECT LAST_INSERT_D();</paragraph>
48cdf0e10cSrcweir</body>
49cdf0e10cSrcweir</helpdocument>
50