Sub createAccessTable() On Error Resume Next cnn.ConnectionString = cnn_str("Accdb") cnn.Open cnn.Execute "CREATE TABLE TB_DATASET " & _ "(DATASET_CD CHAR, DATASET_NM CHAR, DATASET_DC CHAR, " & _ "CONSTRAINT TB_DATASET_CONS UNIQUE (DATASET_CD))" cnn.Execute "CREATE TABLE TB_DATASET_COL " & _ "(DATASET_CD CHAR, COL_NM CHAR, SEQ INTEGER, COL_DC CHAR, " & _ "CONSTRAINT TB_OPN_DATASET_COL_CONS UNIQUE (DATASET_CD,COL_NM))" cnn.Execute "CREATE TABLE TB_DATA " & _ "(OPN_DATA_ID INTEGER, DATASET_CD CHAR, DAT_01 CHAR, DAT_02 CHAR, DAT_03 CHAR, DAT_04 CHAR, DAT_05 CHAR, " & _ "CONSTRAINT TB_OPN_DATA_CONS UNIQUE (OPN_DATA_ID))" cnn.Close Set cnn = Nothing End Sub
2016-07-08
Create Table statement AccessDB
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment