Hello guys,
im having trouble with this line of code. I'm trying to create a table in access using this piece of code but it says 'Object is no longer valid.' and it points to ocat.Tables.App end otbl. How can I solve this error guys?
Heres the code:
Dim otbl As New ADOX.Table
Dim ocat As New ADOX.Catalog
otbl.Name = "Table1"
otbl.Columns.Ap pend "strItemCod e", adChar
otbl.Columns.Ap pend "strItemNam e", adChar
otbl.Columns.Ap pend "intTotalQt y", adInteger
otbl.Columns.Ap pend "intPullOut ", adInteger
otbl.Columns.Ap pend "intTotalAm t", adInteger '
ocat.Tables.App end otbl
im having trouble with this line of code. I'm trying to create a table in access using this piece of code but it says 'Object is no longer valid.' and it points to ocat.Tables.App end otbl. How can I solve this error guys?
Heres the code:
Dim otbl As New ADOX.Table
Dim ocat As New ADOX.Catalog
otbl.Name = "Table1"
otbl.Columns.Ap pend "strItemCod e", adChar
otbl.Columns.Ap pend "strItemNam e", adChar
otbl.Columns.Ap pend "intTotalQt y", adInteger
otbl.Columns.Ap pend "intPullOut ", adInteger
otbl.Columns.Ap pend "intTotalAm t", adInteger '
ocat.Tables.App end otbl
Comment