create a new page, using OOoBasic/Base/Tables as a template.
Front page
Search
掲示板
Reload
Help
Browse Log
掲示板の使い方
OOo 掲示板3
OOo 掲示板2
OOo 掲示板
掲示板
雑談掲示板
New
List of pages
Recent changes
Backup
簡単ヘルプ
整形ルール
Start:
* テーブル [#m076b33f]
データソースに接続した後テーブルコンテナから個々のテーブ...
oConnection = oDataSource.getConnection("", "")
oTables = oConnection.getTables()
** 新規テーブル [#ucd0317f]
新しいテーブルはテーブルコンテナから DataDescriptor を作...
テーブルをコンテナに追加するまでに設定できるカラムの属性...
' 新規テーブルの作成
oTable = oTables.createDataDescriptor()
' テーブル名
oTable.Name = sTableName
' カラムコンテナ
oColumns = oTable.getColumns()
' カラムの編集
oDataTypes = com.sun.star.sdbc.DataType
' 新しいカラム
oDesc = oColumns.createDataDescriptor()
oDesc.setPropertyValues( _
Array("Name", "Type"), _
Array("ID", oDataTypes.INTEGER))
oDesc.IsNullable = 0
oDesc.IsAutoIncrement = True
'oDesc.FormatKey = 5001 ' UI 表示用のためここで設定して...
'カラムを追加
oColumns.appendByDescriptor(oDesc)
'.... 他のカラム設定
' テーブルをコンテナに追加する
oTables.appendByDescriptor(oTable)
' UI でのカラム設定
oTable = oTables.getByName(sTableName)
oColumns = oTable.getColumns()
' 日付の表示を year/month/date ? に変更
oColumn = oColumns.getByName("DATE")
oColumn.FormatKey = 5036
End:
* テーブル [#m076b33f]
データソースに接続した後テーブルコンテナから個々のテーブ...
oConnection = oDataSource.getConnection("", "")
oTables = oConnection.getTables()
** 新規テーブル [#ucd0317f]
新しいテーブルはテーブルコンテナから DataDescriptor を作...
テーブルをコンテナに追加するまでに設定できるカラムの属性...
' 新規テーブルの作成
oTable = oTables.createDataDescriptor()
' テーブル名
oTable.Name = sTableName
' カラムコンテナ
oColumns = oTable.getColumns()
' カラムの編集
oDataTypes = com.sun.star.sdbc.DataType
' 新しいカラム
oDesc = oColumns.createDataDescriptor()
oDesc.setPropertyValues( _
Array("Name", "Type"), _
Array("ID", oDataTypes.INTEGER))
oDesc.IsNullable = 0
oDesc.IsAutoIncrement = True
'oDesc.FormatKey = 5001 ' UI 表示用のためここで設定して...
'カラムを追加
oColumns.appendByDescriptor(oDesc)
'.... 他のカラム設定
' テーブルをコンテナに追加する
oTables.appendByDescriptor(oTable)
' UI でのカラム設定
oTable = oTables.getByName(sTableName)
oColumns = oTable.getColumns()
' 日付の表示を year/month/date ? に変更
oColumn = oColumns.getByName("DATE")
oColumn.FormatKey = 5036
Page: