473,586 Members | 2,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple-step generated error.

neo008
85 New Member
Hi all,

Finally gave up and putting it here.

I am new to visual basic stucked up with an error-

Run time errors.'-2147217887 (8004021)': Multiple-step operation generated errors. check each status value.

Error comes at ADODC.RECORDSET .UPDATE command.


Because of multi column listbox's limitations I'm using 3 istboxes which temporarily save items to be sold and at last get updated into database on a command button click event.
Also I am using some temporary variables and textboxes to store data because Addnew command clears the fields.

Interesting things
1. It saves successfully for first two attempts and at third time it shows me above error.
2. Even if the conditions are satisfied for FOR loop it gets out of the loop after a run.


here is detail

Expand|Select|Wrap|Line Numbers
  1.   If NoSale = True Then
  2.     Exit Sub
  3.   Else
  4.     'SHOWS A DIALOG SETS THE VALUE OF DebitCredit.Text
  5.     DialogDbCr.Show
  6.     If DebitCredit.Text = "" Then
  7.       Exit Sub
  8.     Else
  9.  
  10.       If DebitCredit.Text = "CREDIT" Then
  11.         OtherCash.Text = "CREDIT"
  12.         'IF SALE IS ON CREDIT NO NEED OF CASH DETAIL
  13.       Else
  14.         If DebitCredit.Text = "DEBIT" Then DialogCash.Show
  15.           'DialogCash SETS THE DETAIL OF CASH INTO OtherCash.Text
  16.       End If
  17.  
  18.       If OtherCash.Text = "" Then
  19.         Exit Sub
  20.       Else
  21.         'SOME TEMP VARIABLES AND TEXT BOXES ARE STORING VALUES
  22.         CashOther = OtherCash.Text
  23.         DebCre = DebitCredit.Text
  24.         'TempState.Text = OtherMP.Text
  25.         TempDate.Text = SDate.Text
  26.         Dis = Val(DiscountGiven.Text)
  27.         tx = Val(Tax.Text)
  28.  
  29.         'TIME TO UPDATE
  30.         ' LCount IS LISTCOUNT (NUMBER OF LIST ITEMS)
  31.         For i = 0 To i = LCount - 1
  32.           SaleData.Refresh '''''''''''''ADODC.REFRESH
  33.           SaleData.Recordset.AddNew
  34.  
  35.           'RESTORING DATA TO DATA BOUND CONTROLS FROM TEMP VARIABLES 'AND TEXT BOXES
  36.  
  37.           'HID_Sale AND CID_Sale ARE TEXTBOXES
  38.           HID_Sale = Val(HCompanyID.Text)
  39.           CID_Sale = Val(CustomerID.Text) '''''
  40.           OtherMP.Text = TempState.Text
  41.           SDate.Text = TempDate.Text
  42.  
  43.           'OtherCash AND DebitCredit ARE TEXTBOXES
  44.           'CashOther and DebCre ARE VARIABLES AS STRING
  45.           OtherCash = CashOther
  46.           DebitCredit = DebCre
  47.  
  48.           ' Tax AND DiscountGiven ARE TEXT BOXES
  49.           'Dis AND tx ARE VARIABLE AS DOUBLE
  50.           DiscountGiven = Dis '
  51.           Tax = tx
  52.  
  53.           'TEXT BOXES RESTORING DATA FROM LIST BOXES
  54.           PID_Sale = Val(ProIDList.List(i))
  55.           Quantity = Val(QuaList.List(i)) '''''
  56.           SPrice = Val(RateList.List(i))
  57.  
  58.           TotalAmount = Val((Val(Val(Val(SPrice.Text) * Val(Quantity.Text)) * Val(Tax.Text)) / 100) + Val(Val(SPrice.Text) * Val(Quantity.Text)) - Val(Val((Val(Val(Quantity.Text) * Val(SPrice.Text)) * Val(DiscountGiven.Text))) / 100))
  59.  
  60.  
  61.           SaleData.Recordset.Update '  ERRORRRRRRRRRR
  62.           'SaleData.Refresh
  63.  
  64.         Next i
  65.  
  66.       MsgBox "Sold"
  67.       SaleData.Refresh
  68.       Call Clear
  69.       Call EnableSale
  70.       Call EnableControls
  71.  
  72.       ProIDList.Clear
  73.       QuaList.Clear
  74.       RateList.Clear
  75.  

Please point out my mistakes and help me.

NE☼
Jun 19 '07 #1
4 4018
neo008
85 New Member
Hi again,

Well I think it's simple for you experts because I might have done mistakes in syntax also.

First possibility is that I have done mistakes in data transfer between temporary storage.

Second possibility of this error may be data type mismatch with database.

Third - data limit of any data type is exceeding.


Could somebody please help me? I'm using VB6 and MS-ACCESS

NE☼
Jun 20 '07 #2
ansumansahu
149 New Member
Hi again,

Well I think it's simple for you experts because I might have done mistakes in syntax also.

First possibility is that I have done mistakes in data transfer between temporary storage.

Second possibility of this error may be data type mismatch with database.

Third - data limit of any data type is exceeding.


Could somebody please help me? I'm using VB6 and MS-ACCESS

NE☼
Hi ,

Have a look at this site which talks about the "'Multiple-step OLE DB' error". Hope this helps you out.

good luck
-ansuman sahu
Jun 20 '07 #3
neo008
85 New Member
Hi ,

Have a look at this site which talks about the "'Multiple-step OLE DB' error". Hope this helps you out.

good luck
-ansuman sahu
Hi Ansumansahu,

I went through the given link and i think that is a description of any other but somewhat same error. It is true that there may be some datatype mismatch as i lready stated in 2nd post. I can say this because I had searched about the problem on net before posting here.

And what all possibilities I found I have described in Ist and 2nd posts.

Since I have elaborated my problem very much it seems like a big one but I think if somebody can check datatype mismatch or data limit exeeding in above code could catch the cause of error.
Jun 20 '07 #4
neo008
85 New Member
Any Idea any suggession please.

NE☼
Jun 21 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

13
12032
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location on the server (in our own accounts on the same machine). When I am testing both versions of our program using the same browser (IE on Windows or...
6
10552
by: x. zhang | last post by:
Hi Guys, We know that we can use <input type=file ...> to upload one file per time to the server. My question is if there are some way to upload multiple files per time to the server. (Of course, we can use <input type=file ...> multiple times and then submit once. But this is not what I want, because we have to click "browse" button...
11
4933
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g., http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl) that indicate that ASP will queue up requests when they come...
5
2170
by: Morgan Cheng | last post by:
It seems no pattern defined by GoF takes advantage of multiple inheritance. I am wondering if there is a situation where multiple inheritance is a necessary solution. When coding in C++, should multiple inheritance still be avoided? If yes, why multiple inheritance is introducted into C++?
6
4284
by: Ben Hallert | last post by:
Hi guys, I'm trying to figure out what bone headed mistake I made on something I put together. I've got a form (named 'context') that has a variable number of select-multiple inputs on it. Based on the number of variables passed through a GET string, I want to multiply the total number of selected items for each together to see how many...
22
23337
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete examples?
9
23065
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated to a pool. If I assign only one application to a applicaton pool and have multiple worker processes assigned to that pool. Will my application be...
9
2763
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and wizards. But, I have found that trying to do something "outside the norm" adds a rather large level of complexity and/or data replication. Background I...
4
4686
by: Matt Kruse | last post by:
While developing an internal IE6-only webapp, a discussion started about the 'best' way to apply classes to data tables across multiple pages. The two arguments were: 1. Apply a single class to each table. That class (possibly in combination with other classes on child elements) controls every part of the table - layout, colors, fonts, etc....
35
9319
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
0
7912
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6614
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.