When I add more than forty four columns, NewDB.Tables.Append(NewDB) throws an error "Record is to Large"
Otherwise it to work perfectly.
Otherwise it to work perfectly.
Code:
Private Sub CreateGPSMastertbl()
Dim NewDB As New ADOX.Catalog()
NewDB.Create(strConn + vFolder + "GPS" + DateTime.Now.ToString("yyyyMMdd") + ".mdb;Jet OLEDB:Engine Type=5")
Dim NewDT As New ADOX.Table()
NewDT.Name = "MasterTabls"
NewDT.Columns.Append("First", ADOX.DataTypeEnum.adDouble)
NewDT.Columns.Append("Second", ADOX.DataTypeEnum.adDouble)
NewDT.Columns.Append("Third", ADOX.DataTypeEnum.adWChar, 3)
NewDT.Columns.Append("Fourth", ADOX.DataTypeEnum.adWChar, 50)
NewDT.Columns.Append("Fifth", ADOX.DataTypeEnum.adDouble)
NewDT.Columns.Append("Sixth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Seventh", ADOX.DataTypeEnum.adWChar, 30)
NewDT.Columns.Append("Eighth", ADOX.DataTypeEnum.adWChar, 5)
NewDT.Columns.Append("Nineth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Tenth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Eleventh", ADOX.DataTypeEnum.adWChar, 10)
NewDT.Columns.Append("Twelveth", ADOX.DataTypeEnum.adWChar, 10)
NewDT.Columns.Append("Thirteenth", ADOX.DataTypeEnum.adWChar, 10)
NewDT.Columns.Append("Fourteenth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Fifteenth", ADOX.DataTypeEnum.adDouble)
NewDT.Columns.Append("Sixteenth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Seventeenth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Eighteenth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Nineteenth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Twentyeth", ADOX.DataTypeEnum.adWChar, 30)
NewDT.Columns.Append("Twentyfirst", ADOX.DataTypeEnum.adWChar, 30)
NewDT.Columns.Append("Twentysecond", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Twentythird", ADOX.DataTypeEnum.adWChar, 30)
NewDT.Columns.Append("Twentyfourth", ADOX.DataTypeEnum.adWChar, 100)
NewDT.Columns.Append("Twentyfifth", ADOX.DataTypeEnum.adWChar, 100)
NewDT.Columns.Append("Twentysixth", ADOX.DataTypeEnum.adWChar, 100)
NewDT.Columns.Append("Twentyseventh", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Twentyeighth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Twentynineth", ADOX.DataTypeEnum.adWChar, 20)
NewDT.Columns.Append("Thirtyeth", ADOX.DataTypeEnum.adWChar, 10)
NewDT.Columns.Append("Thirtyfirst", ADOX.DataTypeEnum.adWChar, 100)
NewDT.Columns.Append("Thirtysecond", ADOX.DataTypeEnum.adWChar, 100)
NewDT.Columns.Append("Thirtythird", ADOX.DataTypeEnum.adWChar, 100)
NewDT.Columns.Append("Thirtyfourth", ADOX.DataTypeEnum.adWChar, 255)
NewDT.Columns.Append("Thirtyfifth", ADOX.DataTypeEnum.adWChar, 255)
NewDT.Columns.Append("Thirtysixth", ADOX.DataTypeEnum.adWChar, 255)
NewDT.Columns.Append("Thirtyseventh", ADOX.DataTypeEnum.adDouble)
NewDT.Columns.Append("Thirtyeight", ADOX.DataTypeEnum.adDouble)
NewDT.Columns.Append("Thirtynineth", ADOX.DataTypeEnum.adWChar, 36)
NewDT.Columns.Append("Fourtyeth", ADOX.DataTypeEnum.adWChar, 36)
NewDT.Columns.Append("Fourtyfirst", ADOX.DataTypeEnum.adDate)
NewDT.Columns.Append("Fourtysecond", ADOX.DataTypeEnum.adDate)
NewDT.Columns.Append("Fourtythird", ADOX.DataTypeEnum.adWChar, 36)
NewDT.Columns.Append("Fourtyfourth", ADOX.DataTypeEnum.adWChar, 20)
'NewDT.Columns.Append("Fourtyfifth", ADOX.DataTypeEnum.adWChar, 100)
'NewDT.Columns.Append("Fourtysixth", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fourtyseventh", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fourtyeighth", ADOX.DataTypeEnum.adWChar, 100)
'NewDT.Columns.Append("Fourtynineth", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fiftyeth", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fiftyfirst", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fiftysecond", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fiftythird", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fiftyfourth", ADOX.DataTypeEnum.adDouble)
'NewDT.Columns.Append("Fiftyfifth", ADOX.DataTypeEnum.adWChar, 10)
'NewDT.Columns.Append("Fiftysixth", ADOX.DataTypeEnum.adWChar, 20)
'NewDT.Columns.Append("Fiftyseventh", ADOX.DataTypeEnum.adBoolean)
'NewDT.Columns.Append("Fiftyeighth", ADOX.DataTypeEnum.adWChar, 50)
NewDB.Tables.Append(NewDT)
NewDB = Nothing
NewDT = Nothing
End Sub