Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Multiple step OLE DB..." error message

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
0
0
AU
Hello,

I am using VB6SP4 with Access 2000. I have this application distributed amongst numerous customers with any issue aside from one. For the first I am getting a customer with the following error message "Multiple step OLE DB operation generated errors. Check each OLE DB status value, if available, no work was done." The error occurs upon clicking a command that contains the following code (assume all other code is correct), the client is using XP:

Adodc1.Recordset.AddNew
Adodc2.Recordset.AddNew
Adodc3.Recordset.AddNew
Adodc5.Recordset.AddNew

I am using the client’s database and application on my terminal without a problem. It appears to involve the database connectivity, if someone can help me resolve the cause of this problem I would greatly appreciate it.

Thank You
 
Don't know if this will help, however I normally come across this problem when trying to insert more data into a field that the field will actually allow.


Hammy.
 
I have had similiar problems in the past and found it can occurr in 1 of two situations:-

1. The recordset field has been set to the value of a variable that is of the incorrect type i.e. the database table column is a numeric and the variable assigned to the recordset is a numeric.

2. As the previous reply stated you are trying to place a string that is say 30 characters, into a database table column that is only 20 characters in length.

Hope this helps
 
Thank you for your responses, I don't think the solutions given will work because the client in question is using the same database with the same data (initially) as all of the other clients (who are not having a problem), could it be a connectivity issue ?
 
You have listed 4 commands that makes me think that you are not quite sure which one of the 4 addnew commands is causing the problem.

Have you tried putting in line numbers and then using Erl in you error handler. If you do this you should be able to track the exact line down that is causing the problem and then debug from there.

To add line numbers you could try:

- Cracking Addin for VB, adding a lot of functionality.

If you are going to use Kdaddin2.html I would recommend not using the Beta one. The 4.51 version is better. This addin also has the ability to generate error handling throughout you project and has the code for a Error Handling Module. Simpler that mztools, but does what it does well.

Hammy.
 
Hi,
Try this thread may be this will help you.
thread709-588191
If the number of records are more than 50000 and above this error occur.

and what clintonwhite said is also correct.

Regards
John Philip

*** Even the Best, did the Bad and Made the Best ***

John Philip
 
There are MANY causes for this error.

IF it does have something to do with the locks, then:

Under DAO:

DAO.SetOption dbMaxLocksPerFile = 100000

Under ADO using the JET provider:

conn.Provider = xxxx
conn.Properties("Jet OLEDB:Max Locks Per File") = 100000
conn.Open XXXX

Be sure to store the original value in a variable and set it back prior to closing the connection

It's possible, that under certain conditions this will not work for you with-out setting the registry settings directly using the RegOpenKeyEx RegSetValueExLong API functions.

With the above leading question, limit the number of records in the recordset to only a few records for ALL data controls.
If the problem goes away, then it is probably a lock problem and requires the registry setting.
Also, use a adOpenKeyset cursor type and a adLockOptimistic if using a server side cursor. This may also cure the problem.

I too, cannot understand why you would need to call the AddNew method on 5 recordsets at the same time.
Sounds unneeded....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top