Creating Memo fields with ADOX

Posted on 2006-05-18
Last Modified: 2012-08-14
I'm using ADOX to create a local table in order to cache records from my SQL Server database. I'm writing my code so that the table will automatically be deleted and recreated should the structure of the SQL Server table change.

One field in the SQL Server table is declared as varchar(500). Because of the size, this means that a memo field is necessary in my Access table. My problem is that there doesn't appear to be a constant available to declare the Memo data type in ADOX. Here's the list of data types I am using. Is it incomplete?

Question by:ipendlebury
    LVL 44

    Assisted Solution

    by:Leigh Purvis
    Nope adLongVarWChar
    LVL 34

    Accepted Solution

    This seemed to work as expected

        Dim cat As ADOX.Catalog
        Dim tbl As ADOX.Table

       Set cat = New ADOX.Catalog
       Set tbl = New ADOX.Table
       cat.ActiveConnection = CurrentProject.Connection
       tbl.Name = "testThis"
       tbl.Columns.Append "ValidColumn", adInteger
       tbl.Columns.Append "MyMemo", adLongVarWChar
       cat.Tables.Append tbl


    Author Comment

    Yes, it was there all along. I expected it to be called adMemo or something. I've just tried it and it works fine.

    Thanks for your help guys.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now