Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP Recordset Array Error

Posted on 2003-02-19
3
Medium Priority
?
766 Views
Last Modified: 2007-12-19
Provider error '80040e1b'
Identity cannot be determined for newly inserted rows.

Does anyone know what might be causing the above error. The loop is updating a database and on the first loop is doing so successfully but on the second loop the above error is being returned

Here is my code:

For I=0 to Ubound(MyArray)
        if MyArray(I)<>0 then
                rsAddComments3.Fields("Product_id") =(Recordset1.Fields.Item("Product_id").Value)
                rsAddComments3.Fields("Order_id") = CInt(num)
                rsAddComments3.Fields("Order_qty") = CInt(MyArray(I))
                rsAddComments3.Update
                'I=I+1
        end if
         Recordset1.MoveNext()
Next

0
Comment
Question by:Philby_Walsh
[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
3 Comments
 

Expert Comment

by:Kavius
ID: 7982547
Do you ever move your rsAddComments3 recordset? Are you adding to your rsAddComments3? If so you need to issue a .AddNew method.  I guess I'm just getting confused, what does each of your recordsets and your array contain and what are you trying to do?

This looks similar to the problem you are having, not exact but...

http://p2p.wrox.com/archive/sql_server_asp/2001-09/27.asp



0
 
LVL 2

Accepted Solution

by:
mikelovell earned 40 total points
ID: 7983782
that's correct, this would mean you're trying to set a value when you aren't at a specific location in the database, however (as kavius mentions) if you use an 'addnew' before you set the values, it should work fine.
0
 
LVL 4

Expert Comment

by:Wakie
ID: 7984422
Please paste here all of your ASP code including your relevant SQL queries.

Also, please maintain the following open question:

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20495929.html

Regards,
Wakie.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 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