Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8790095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:33:48+00:00 2026-06-13T22:33:48+00:00

I am getting values from a database, and trying to insert them into Internet

  • 0

I am getting values from a database, and trying to insert them into Internet Explorers history, using the UrlHistoryWrapper class. When I set the for conditions to something in the thousands, I will get this error, however, when I set the for condition to less than 100, it will run fine. I have checked the memory usage, and it should cause no problems. How can I make this code able to run, if chrome.URLs and firefox.URLs have thousands of values?

This is my code:

UrlHistoryWrapperClass urlHistory;
        UrlHistoryWrapperClass.STATURLEnumerator enumerator;
        List<STATURL> list = new List<STATURL>();
        urlHistory = new UrlHistoryWrapperClass();
        enumerator = urlHistory.GetEnumerator();
        bool display = false;
        chrome.GetHistory(display);
        for (int i = 0; i < chrome.URLs.Count; i++ )
        {
            URL url = chrome.URLs[i];
            urlHistory.AddHistoryEntry(url.url, url.title, ADDURL_FLAG.ADDURL_ADDTOHISTORYANDCACHE);
        }
        Firefox firefox = new Firefox();
        firefox.GetHistory(display:false);
        foreach (URL url in firefox.URLs)
        {
            MessageBox.Show(url.url);

            urlHistory.AddHistoryEntry(url.url, url.title, ADDURL_FLAG.ADDURL_ADDTOHISTORYANDCACHE);
        }

And this is my error:

***** Exception Text *******
System.Runtime.InteropServices.COMException (0x80070008): Not enough
storage is available to process this command. (Exception from HRESULT:
0x80070008) at UrlHistoryLibrary.IUrlHistoryStg2.AddUrl(String
pocsUrl, String pocsTitle, ADDURL_FLAG dwFlags) at
UrlHistoryLibrary.UrlHistoryWrapperClass.AddHistoryEntry(String
pocsUrl, String pocsTitle, ADDURL_FLAG dwFlags) at
Namespace.IE.SyncIE() in C:\Users\Chris\documents\visual studio
2010\Projects\TestURLGUI4\TestURLGUI4\URLHistory.cs:line 270 at
Namespace.Program.SyncAll() in C:\Users\Chris\documents\visual studio
2010\Projects\TestURLGUI4\TestURLGUI4\URLHistory.cs:line 152 at
TestURLGUI2.Form1.button11_Click(Object sender, EventArgs e) in
C:\Users\Chris\documents\visual studio
2010\Projects\TestURLGUI4\TestURLGUI4\Form1.cs:line 247 at
System.Windows.Forms.Control.OnClick(EventArgs e) at
System.Windows.Forms.Button.OnClick(EventArgs e) at
System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at
System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks) at
System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.ButtonBase.WndProc(Message& m) at
System.Windows.Forms.Button.WndProc(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)

Edit:

Here is my new code:

    for (var i = 0; i < firefox.URLs.Count; i++ )
    {
        URL url = firefox.URLs[i];
        urlHistory.AddHistoryEntry(url.url, url.title, ADDURL_FLAG.ADDURL_ADDTOHISTORYANDCACHE);
        Thread.Sleep(3);
        form.label1.Text = i + "/" + firefox.URLs.Count;
      //  MessageBox.Show(url.url);
        Application.DoEvents();
    }

Now, with this code, I can go up to 8447 without getting this error, but then it gets thrown.

I had someone else try to do this, and this is what he said:

Just tried your code and and it seems that there is a limit on the
number of the url records that can be added. I did the following
steps.

  1. In Internet Explorer, Clear the history of websites I’ve visited.
  2. I tried your code.
  3. Got a COMException (0x80070008): Not enough storage is available to process this command. The exception is thrown at record number 41021
    for me (Windows 7, 64bit).
  4. I tried your code again, and Got a very same exception. This time, No record have be added. To add the url records again. I have
    to clear the history of websites in Internet Explorer. I could not
    find a way to fix the problem.

For anyone who needs to know, the source code for the URLhistoryWrapper can be found on this CodeProject project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:33:49+00:00Added an answer on June 13, 2026 at 10:33 pm

    Here is the solution I found to work. U need to run the

    foreach (URL url in firefox.URLs)
        {
            MessageBox.Show(url.url);
    
            urlHistory.AddHistoryEntry(url.url, url.title, ADDURL_FLAG.ADDURL_ADDTOHISTORYANDCACHE);
        }
    

    and the chrome ones, etc, in another thread. Like this:

    Thread testthread = new Thread(SynceFirefoxToIE);
            testthread.Name = "FirefoxToIESynceThread";
            testthread.Start();
    
    
        }
    
        public void SynceFirefoxToIE() 
        {
            foreach (URL url in firefox.URLs)
          {
    
             urlHistory.AddHistoryEntry(url.url, url.title, ADDURL_FLAG.ADDURL_ADDTOHISTORYANDCACHE);
          }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting error while inserting values into database (SQL Server 2008) Implicit conversion from data
I am trying to insert a data into SQLite database using Python. INSERT INTO
i am trying to insert data from excel sheet into database in java. for
I'm getting this error when trying to insert data from a form into a
I am trying to fetch the values from the database but i am getting
I have written the Database class & trying to insert the values in the
I am trying to learn how to take control values and insert them into
When trying to INSERT data into a database table, I've been getting the following
I am trying to insert an entry into a database using a form created
I'm trying to use mysqli to insert data from a form into a database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.