Dear All,
I searched on the internet but run out of luck. I am looking for how to write in the script the field data type. Below is my sample code to create table:
I learned how to determine “text” ,”number”,”Boolean”,”date”, etc. field data type. But where can I find the reference for all data type. Because I would like to create the table with the first field “AutoNumber”. I tried this did not work:
Anyone provide me link?
Thank you for the help
I searched on the internet but run out of luck. I am looking for how to write in the script the field data type. Below is my sample code to create table:
Code:
Set objConnection = New ADODB.Connection
With objConnection
.Open strConnectString
.Execute "CREATE TABLE tblTest ([StaffId] decimal(6), " & _
"[StaffName] text(150) WITH Compression, " & _
"[StaffOrgPit] text(10) WITH Compression, " & _
"[StaffTime] text(10) WITH Compression, " & _
"[StaffCurrPit] text(10) WITH Compression, " & _
"[StaffPosition] text(10) WITH Compression, " & _
"[A-A] text(10) WITH Compression) "
End With
Set objConnection = Nothing
I learned how to determine “text” ,”number”,”Boolean”,”date”, etc. field data type. But where can I find the reference for all data type. Because I would like to create the table with the first field “AutoNumber”. I tried this did not work:
Code:
With objConnection
.Open strConnectString
.Execute "CREATE TABLE tblTest ([StaffId] AutoGenerate, " & _
"[StaffName] text(150) WITH Compression, " & _
"[StaffOrgPit] text(10) WITH Compression, " & _
"[StaffTime] text(10) WITH Compression, " & _
"[StaffCurrPit] text(10) WITH Compression, " & _
"[StaffPosition] text(10) WITH Compression, " & _
"[A-A] text(10) WITH Compression) "
End With
Anyone provide me link?
Thank you for the help