当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > AppML 数据库元素
The <database> element contains information about the database connection.
<database>元素嵌套了关于数据库连接的信息。
The <database> element contains information about the database connection.
<database>元素嵌套了关于数据库连接的信息。
Inside the <database> element, there is a mandatory <connection> element that contains a named database connection, and other elements, like <sql>, that is used to specify a default SQL selection for the application.
在<database>元素内,有一个包含数据库链接以及其它诸如<sql>这样的元素,用于为应用程序指定默认的SQL连接。
<?xml version="1.0" ?> <appml> <database> <connection>northwind</connection> <sql>SELECT CompanyName,ContactName,City FROM Customers</sql> </database> .... </appml> |
The <database> element may have the following child elements:
<database>元素可以包含下列子元素:
Element 元素 | Description 描述 |
---|---|
connection | Contains a named database connection 包含了指定的数据库连接 |
constraint | Defines constraints between tables 定义了表格间的限制条件 |
keyfield | Defines the primary key of the maintable 定义了主群组的首要键 |
maintable | Defines the main table of the database connection 定义了数据库连接的主表格 |
sql | Defines a default SQL for the application 为应用程序定义了默认的SQL |