[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Out of memory error (7) when calling save method of ADO recordset object

Posted on 2011-02-17
2
Medium Priority
?
998 Views
Last Modified: 2012-05-11
I am getting an out of memory run-time error '7' when I call the save method of the ADO Recordset object. I have tried this using VBA code in Excel and Access and I get the same error. I have also tried using ADO 2.6 and 2.8 and I get essentially the same error. I have also tried connecting to MSAccess database and Visual Foxpro database and I get the same error. However I do not get an error when saving changes in Access or Foxpro when using direct access or ODBC. Please could you help me resolve this problem? It's driving me nuts! I have managed to reduce the code below to the most basic version I can to reproduce the error. My machine is running Windows XP Pro SP3 and I am using Office 2007.
Sub Test1()

    Dim connAdo As ADODB.Connection
    Dim rstTest As ADODB.Recordset
    
    Set connAdo = New ADODB.Connection
    connAdo.Open ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\develop\database3.accdb;Persist Security Info=False;")
    
    Set rstTest = New ADODB.Recordset
    rstTest.Open "table1", connAdo, adOpenDynamic, adLockPessimistic
    rstTest.MoveFirst
    
    rstTest.Fields("field1").Value = "Test"
    rstTest.Save   '' THIS LINE CAUSES RUNTIME ERROR
    
End Sub

Open in new window

0
Comment
Question by:Caltor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
Caltor earned 0 total points
ID: 34922315
Don't worry; I've sorted it!
Should be rstTest.Update NOT rstTest.Save
Doh! The hours I've wasted on this.....
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Suggested Courses

650 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