473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

large recordset - error -2147217887 (80040e21)

My code, visual basic 6.3 for access 2002 SP3, returns a large
recordset
strSQL = "SELECT * FROM tblMobileCalls WHERE Client = '" &
strClient & "'"
rstCalls.Open strSQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic, adCmdText

400,255 rows, I loop through each record in turn setting a field equal
to some string value. The code stops on the .movenext command (.eof =
false) with 31048 rows left to process with 'Run time error 2147217887
(80040e21) - invalid argument'

Heeeeeeeelp :) !!!
Please can anyone shed light on the problem
Thanks

Nov 13 '05 #1
6 7712

or******@hotmail.com wrote:
My code, visual basic 6.3 for access 2002 SP3, returns a large
recordset
strSQL = "SELECT * FROM tblMobileCalls WHERE Client = '" &
strClient & "'"
rstCalls.Open strSQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic, adCmdText

400,255 rows, I loop through each record in turn setting a field equal
to some string value. The code stops on the .movenext command (.eof =
false) with 31048 rows left to process with 'Run time error 2147217887
(80040e21) - invalid argument'


Try this:

http://groups.google.com/groups?q=2147217887

It may be that you need a later version of MDAC or something.

Edward

Nov 13 '05 #2
I would use an UPDATE Command rather than looping through a recordset,
assuming of course that your SomeString is the same for each record you
are updating. Something like this:

Dim Comm As New ADODB.Command, ComString As String

ComString = "UPDATE tblMobileCalls SET FieldName = " & SomeString &
"WHERE Client = & "" & strClient & ""

With Comm
.Activeconnection = CurrentProject.Connection
.CommandType = adCommandText
.CommandText = ComString
.Execute
End With

Set Comm = Nothing

If I've got the syntax right, that should update your table without
using up your available memory as I think is happening with your
current method.

Even if using a recordset, you should try to only address the fields
that you are going to work with, especially if working over a network.

Good luck.

Nov 13 '05 #3
I think the problem is because the database had become larger than 2GB
Can't use an UPDATE method because it is too slow - this already takes
ages to run
Don't worry :) the select * is fine - I need all the fields

Anyway - now my database is corrupt - I hate Access sometimes
arghhhhhhh!
Have to port to a proper DB now :(

Nov 13 '05 #4
or******@hotmail.com wrote in
news:11*********************@g14g2000cwa.googlegro ups.com:
I think the problem is because the database had become larger than
2GB Can't use an UPDATE method because it is too slow - this
already takes ages to run
???

A SQL update will *always* be faster than looping through the same
records and changing the one at a time. That doesn't mean it will be
FAST, but it will always be faster than sequential processing of the
records.
Don't worry :) the select * is fine - I need all the fields

Anyway - now my database is corrupt - I hate Access sometimes
arghhhhhhh!
Have to port to a proper DB now :(


The issue is NOT Access -- you are not using Access, but only the
Jet database engine.

And the issue is not Jet that's the problem. It's entirely pilot
error in that you didn't plan for this when choosing the data store
for your application.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
really? are you sure it will be faster? i'll do a little test.
does changing the recordset in effect run SQL behind the scenes anyway.
I am changing several fields on every row of the recordset to a
different value each time.

Yes I know it's my fault for not choosing a more robust data store
although I never knew it would get so big.

Nov 13 '05 #6
or******@hotmail.com wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:
really? are you sure it will be faster? i'll do a little test.
does changing the recordset in effect run SQL behind the scenes
anyway. I am changing several fields on every row of the recordset
to a different value each time.
Well, that's somewhat different -- if you're running an update on
other tables for each row of your recordset, it's likely you *can't*
do that in plani SQL.
Yes I know it's my fault for not choosing a more robust data store
although I never knew it would get so big.


My points is: don't badmouth Jet for a mistake that is *your* fault.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: cschang | last post by:
Error: "ORA-06513: PL/SQL: index for PL/SQL table out of range for host language array ORA-06512: at line 1 /vd2/asp/BinInactivityResults.asp, line 249" the error only appeared when I had a large...
8
by: dmiller23462 | last post by:
My brain is nuked....Can anybody tell me right off the bat what is wrong with this code? Along with any glaring errors, please let me know the syntax to display a message (Response.Write would be...
6
by: Alan Silver | last post by:
Hello, I have an ASP that takes a connection string and SQL statement in the querystring and is supposed to return the XML representation of the recordset to the Response stream (don't worry,...
4
by: sherkozmo | last post by:
SQL2000 - AccessXP I built an adp file with a stored procedure from SQL as follows: SELECT * FROM Z_mis_sjk_job_code_access WHERE job_code=@JobCode UNION ALL SELECT * FROM...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
0
by: Thomas Zimmermann | last post by:
Hi I have an Accesss 97 database that imports data from an Oracle database. Some of the text fileds in the oreacle database have a fileds size larger than 255 characters. If I just link the...
24
by: Salad | last post by:
Every now and then I see ads that state something like "Experience with Large Databases ...multi-gig...blah-de-blah" And I have to laugh. What's the difference between a large or small database? ...
6
by: =?Utf-8?B?SVQgTWFuYWdlcg==?= | last post by:
We are using Windows Server 2003 along with IIS 6. When trying to browse to an ASP page, the following error is returned: Active Server Pages error 'ASP 0107' Data size too large. Size of...
2
by: ARC | last post by:
Just curious if anyone is having issues with Acc 2007 once the number of objects and complexity increases? I have a fairly large app, with many linked tables, 100's of forms, queries, reports, and...
2
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.