How to convert ADO.rs.field.type to DAO.rs.field.type?
Posted on 2001-06-25
I need to create mdb files on the fly with data from SQL server. I'll be getting data through ADODB.rs. When I try to create mdb file using the following syntex:
Set dbDatabase = CreateDatabase(sNewDBPathAndName, dbLangGeneral, dbEncrypt)
For Each fld In rs.Fields
Set fldArray(i) = tdLogTable.CreateField(fld.Name, fld.Type, fld.DefinedSize)
i = i + 1
the program error out at the table.CreateField method. The "fld.Type" returns an ADODB.rs.field type which can't be recognized by the CreateField method. Can anyone show me how to solve this? Thanks in advance!