473,503 Members | 1,858 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 4009
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
12018
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...
6
10541
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...
11
4894
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.,...
5
2166
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...
6
4268
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. ...
22
23316
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...
9
23055
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...
9
2754
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...
4
4669
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...
35
9298
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...
0
7086
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...
0
7330
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...
1
6991
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
7460
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...
1
5014
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...
0
3167
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...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
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...

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.