+ Reply to Thread
Results 1 to 3 of 3

Recordset is concatenated when importing it

  1. #1
    Registered User
    Join Date
    05-21-2025
    Location
    Cantu, Italy
    MS-Off Ver
    Business 365
    Posts
    24

    Recordset is concatenated when importing it

    Hi, Im using an adodb to get data from a closed workbook, and it looked like it worked fine - until i realized it was concatenating (255 chars) the values in a column (L:L or column 12) where I have cells containing text, up to some 5000 chars, worst case maybe 10000.
    The array becomes pretty big, I have around 20000 rows and 35 columns totally so reserving 10000bits for each cell might be a problem.

    I have tried to import the recordset to an array as a string, but this fails, as far as I can see due to null values in the recordset. Is there a workaround where I can get the recordset ignoring the nulls (letting them be text "" or something) so I can declare the array as string instead of variant - or in another way increase the cell length. Or maybe import that column separately declaring it different? I have tried a few things but nothing has worked so far.

    I have attached an example with "long text strings" in the "BOMStr" column. In the code "DataBaseDir" should be corrected to a local dir before running the code from another workbook.

    In the variable TableArr you find the concatenated textstrings in TableArr(10,12), (10,13) and (10,14). The one in (10,12) should contain more than 6000chars. All 3 are truncated to 255 chars...


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by nielsjmp; 07-07-2025 at 07:07 AM. Reason: Code updated

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2508 Win 11
    Posts
    24,957

    Re: Recordset is concatenated when importing it

    You would be better served with supplying a sample of your worksheet with no personal data. Maybe only 8-15 records and then mock up your expected solution. A day and half with no responses . I think we need to see some data.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-21-2025
    Location
    Cantu, Italy
    MS-Off Ver
    Business 365
    Posts
    24

    Re: Recordset is concatenated when importing it

    Youre probably right:-)

    Its now included in the edited original message.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Match a concatenated value in a concatenated list in a vba function
    By Rolly_Sefu in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-14-2021, 07:52 AM
  2. Open another recordset within current recordset vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2015, 04:32 AM
  3. Update recordset using vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2015, 10:27 AM
  4. vba to Match concatenated values in concatenated columns
    By bjurick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2012, 03:45 PM
  5. [SOLVED] Recordset Searches
    By James McDowell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2006, 06:25 PM
  6. [SOLVED] Need ADO Recordset Help
    By Mr B in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-21-2006, 11:55 AM
  7. [SOLVED] Recordset's RowID as part of Recordset
    By Trip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2005, 06:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1