したがって、デフォルトのワークスペースにアクセスファイルを作成し、テーブルを作成し、そのテーブルにいくつかのフィールドを作成する以下のVBがあります...最初のデータ型/フィールドを自動番号に設定するための構文を知る必要があります... GUID、カウンターなどは Access SQL のように機能しません
' error handling usually goes here
dim ws as workspace
dim dbExample as database
dim tblMain as TableDef
dim fldMain as Field
dim idxMain as Index
set ws = workspace(0)
set dbExample = ws.CreateDatabase('string file path')
set tblMain = dbExample.CreateTableDef("tblMain")
set fldMain = tblMain.CreateField("ID", 'right here I do not know what to substitute for dbInteger to get the autonumber type to work )
tblMain.Fields.Append fldMain
etc to create other fields and indexes
したがって、この行では: set fldMain = tblMain.CreateField("ID", dbInteger) dbInteger を、VB が autonumber プロパティとして認識できるものに置き換える必要があります。GUID、Counter、Autonumber、AutoIncrement を試しましたが、残念ながらどれも機能しません。
ここで欠落している構文を知っている人はいますか?
ありがとう、ジャスティン