I'm using VB6 and trying to create a DAO recordset from an array of data. I want something like this but I've hit all kinds of problems
Dim rst As DAO.Recordset
Dim tdf As New DAO.TableDef
Dim fld As New DAO.Field
rst.Fields.Append tdf.CreateField(arrayHeader(0), adInteger, 5)
rst.OpenRecordset
rst.AddNew Array(arrayHeader(0), arrayHeader(1)), Array (arrData(0), arrData(1))
Code is simplified to highlight the problem I have. Arrays are declared and have data in them. Problem at the moment is trying to add the field to the recordset. Is it possible to have a disconnected DAO RecordSet like this? I have to use DAO for various reasons that really aren't worth getting into.