hakke
Sep 1st, 2000, 02:03 AM
Hi,
I've created a database (.mdb) with several tables using ADOX. When I look to the table created, the fields are in alphabetical order instead of the order like in the VB code.
Here's an example :
Private Sub CreateTable()
' Create the tables
Dim NewDB As New ADOX.Catalog
Dim tbl As New ADOX.Table
Dim col As New ADOX.Column
' Connect to database
NewDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\temp\webupdate.mdb"
' Create Table tbl_whs_artikelgroep
Set tbl = New ADOX.Table
With tbl
.Name = "tbl_whs_artikelgroep"
.Columns.Append "grp_code", adChar, 20
.Columns.Append "grp_omschrijving", adChar, 50
.Columns.Append "grp_commercieleomschrijving_nl", adLongVarChar
.Columns.Append "grp_commercieleomschrijving_fr", adLongVarChar
.Columns.Append "grp_lastenboek_nl", adLongVarChar
.Columns.Append "grp_lastenboek_fr", adLongVarChar
NewDB.Tables.Append tbl
End With
Set tbl = Nothing
End Sub
In the table : tbl_whs_artikelgroep the fields are stored in the following order :
grp_code
grp_commercieleomschrijving_nl
grp_commercieleomschrijving_fr
grp_lastenboek_nl
grp_lastenboek_fr
grp_omschrijving
Is there a way to store the order of the fields in the same order like introduced in the VB code?
Thanks,
Hans Hubin
I've created a database (.mdb) with several tables using ADOX. When I look to the table created, the fields are in alphabetical order instead of the order like in the VB code.
Here's an example :
Private Sub CreateTable()
' Create the tables
Dim NewDB As New ADOX.Catalog
Dim tbl As New ADOX.Table
Dim col As New ADOX.Column
' Connect to database
NewDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\temp\webupdate.mdb"
' Create Table tbl_whs_artikelgroep
Set tbl = New ADOX.Table
With tbl
.Name = "tbl_whs_artikelgroep"
.Columns.Append "grp_code", adChar, 20
.Columns.Append "grp_omschrijving", adChar, 50
.Columns.Append "grp_commercieleomschrijving_nl", adLongVarChar
.Columns.Append "grp_commercieleomschrijving_fr", adLongVarChar
.Columns.Append "grp_lastenboek_nl", adLongVarChar
.Columns.Append "grp_lastenboek_fr", adLongVarChar
NewDB.Tables.Append tbl
End With
Set tbl = Nothing
End Sub
In the table : tbl_whs_artikelgroep the fields are stored in the following order :
grp_code
grp_commercieleomschrijving_nl
grp_commercieleomschrijving_fr
grp_lastenboek_nl
grp_lastenboek_fr
grp_omschrijving
Is there a way to store the order of the fields in the same order like introduced in the VB code?
Thanks,
Hans Hubin