I.T. Discussion Community!
-Collapse +Expand
VB Classic
Search VB Classic Group:

Advanced
-Collapse +Expand VB Classic Store

Prestwood eMagazine

May Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyVisual Basic Classic BoardVB Classic Other Topic   Print This     

Unusual Error

Unusual Error in VB Classic Other topic (part of our Visual Basic Classic group).

Quick Search: Unusual   Unusual Error  
afisher
-- USA
I have a property table and a details table. The PK for the property table is an autonumber. When I save a new record, I create the property table record first, then I save the detail record using a different recordset, assigning the PK in the details table recordset (SaveRSDetails) by referencing the PK in the first recordset (SaveRS). I can assign the PK value without problems. When I try to assign any other values to the new record in SaveRSDetails, I get the following message:
------------------------------------------------------------------------------------
Run-time error æ-2147217887 (80040e21)Æ:

Multiple-step operation generated errors. Check each status value.
-------------------------------------------------------------------------------------

The values are passed to my class module through properties and stored in the vntCompRecord array. Here is the code (with extraneous code removed for the sake of simplicity):

Public Function Save() As Boolean

Dim i As Integer
Dim j As Integer
Dim SaveRS As ADODB.Recordset
Dim SaveRSDetails As ADODB.Recordset

strSQL = "Actual Statement Omittedö
strSQLDetails = " Actual Statement Omitted "

Set SaveRS = New ADODB.Recordset
Set SaveRS = GetRecordSet(strSQL, True)
SaveRS.AddNew

For i = 1 To 13
SaveRS(i) = vntCompRecord(i)
Next i

SaveRS.Update

Set SaveRSDetails = New ADODB.Recordset
Set SaveRSDetails = GetRecordSet(strSQLDetails, True)
SaveRSDetails.AddNew
SaveRSDetails(0) = SaveRS(0)

j = 1

For i = 14 To 37
SaveRSDetails(j) = vntCompRecord(i)
j = j + 1
Next i

SaveRSDetails.Update
Save = True

End Function
 Posted 18 years ago (Thread Starter)
Comment Quote
About afisher -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #4431, 1 reply
Thread Started 11/27/2001 10:54:00 AM
View Counter=1312
Last Reply Posted 1/18/2018 9:58:47 PM)
Location=-- USA 
Joined=18 years ago   MB Posts=10  
Most Recent Post
PS_697
-- --

Make sure that you locate relied on resources to download and install Play Store Download connected to your Google Play Store The actions to comply with to obtain an. 

 Posted 16 months ago
Comment Quote
About PS_697 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16982 (Level 2) and Parent is 4431
Reply Posted 1/18/2018 9:58:01 PM
Location=-- -- 
Joined=16 months ago   MB Posts=1  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1261A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #4431 Counter
1312
Since 4/2/2008
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech