When I attempt to create an Access table and add over 7 columns then
I get the following error: Runtime error '-2147467259 (80004005)':
Record is too large
Anyone know why? Is that the limit of appending to a ADOX table object?
Using
VB 5.0 w/ADO Ext 2.8
Code follows:
Private Sub CmdInsert_Click()
Dim cn As New ADODB.Connection
Set Cat = New ADOX.Catalog
Set objTable = New ADOX.Table
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Persist Security Info=False;" & _
"Data Source=" & PathtoMDB & "db1.mdb"
Set Cat.ActiveConnection = cn
objTable.Name = "Table1"
objTable.Columns.Append "ASSET", adWChar
objTable.Columns.Append "MANUFACTURER", adWChar
objTable.Columns.Append "MODEL", adWChar
objTable.Columns.Append "DESCRIPTION", adWChar
objTable.Columns.Append "SERIAL_NUMBER", adWChar
objTable.Columns.Append "PLANT", adWChar
objTable.Columns.Append "DEPARTMENT", adWChar
'commenting out the following line removes the error
objTable.Columns.Append "CAL_DUE_DATE", adWChar
Cat.Tables.Append objTable
MsgBox "Finished creating mdb Table1 file", vbOKOnly, "Message"
cn.Close
Set cn = Nothing
Me.Hide
Unload Me
End Sub