Multi step operation generated an error.

Asked By 270 points N/A Posted on -
qa-featured

We are managing and maintaining a website written in classic ASP 3.0, using Visual basic scripting. The website is a web based booking engine, accepting thousands of bookings a day. Occasionally we are experiencing an unusual error that we did not experience before. The error message states that "Multi step operation generated an error, no work was done.". Does anyone know what this means? We never had this problem before!

SHARE
Best Answer by Mathias
Answered By 0 points N/A #101751

Multi step operation generated an error.

qa-featured

The multi-step operation implies that you are performing multiple operations on a record set and then ultimately submitting the values to the database. This is a typical scenario where SQL statements are batched when using Microsoft ActiveX Data Access Objects, commonly known as ADO.

When you are performing different operations on an open records, you need to be careful at the time the records were opened, right  up to the moment the records are updated using the "update" method of the command object. It is always a best practice to use variables and do the changes on it and then lastly open the records, change the final values and then submit the changed records to the database.

Answered By 0 points N/A #101752

Multi step operation generated an error.

qa-featured

I would think the problem is related to the underlying database. Would it be possible for you to attach a screenshot of the error message, so that we could properly isolate the problem? When ever an ASP error message is popped up by the server, an error code is usually displayed on the page. This error code will provide a clue as to why the message is coming up.

Microsoft has well documented the error codes and messages. But we require both to referred the Microsoft programmers reference guide for ASP related error messages. On the outset you might try updating the ADO objects, by downloading the latest version of Microsoft Data Access Components package (MDAC). This will usually eliminate much of the ADO related errors.

Answered By 270 points N/A #101753

Multi step operation generated an error.

qa-featured

I have attached the error message that one of our clients sent to us recently. Does this error message mean that it had problems in saving the data or reading the data? Does this mean that the underlying database records are corrupt?

Answered By 0 points N/A #101755

Multi step operation generated an error.

qa-featured

The underlying database or data is not effected by this error message. The error message is coming from the middleware that sits between your application and the database. The middleware is responsible for converting the changed objects into relational SQL statements, that need to be executed on the underlying database. 

In event the middleware faces problems in translation, the error message you are experiencing might pop up. I would suggest close examination of the source code, as pointed out by the error message. Usually it will suggest what operation is being performed by the source code. Sometimes there might be a disparity between the data types that you are using in your code. Classic ASP 3.0 is not a strongly typed language. Therefore you need to be careful on data type conversions.

Answered By 270 points N/A #101757

Multi step operation generated an error.

qa-featured

The respective code is just setting a value to a field.

objRs("bookedcustomer") = customerId

I cannot simply understand how such an operation can cause, an entire page to crash! I checked the database and this field is of data type integer. And what do you mean by ASP 3.0 is not a strongly typed language?

Best Answer
Best Answer
Answered By 0 points N/A #101758

Multi step operation generated an error.

qa-featured

ASP 3.0 has only one data type called "variant". It is of type "object". You cannot specify the exact data type by prefixing or suffixing the variable with a keyword such as "String", "Float","Integer". The variable type gets defined on initializing the variable with a constant value.

For example, if you assign a string expression to a variable, then the variable becomes of type string from that point onwards. In event you assign an integer expression to a variable, then the variable becomes of type integer from that point onwards. It is quite easy to lose track of the variable type when the script is lengthy. Therefore Microsoft recommends to name the variables with their prospective data type.

strCustomerId, intCustomerId are few variable names that could be used to avoid confusion in Classic ASP 3.0. What I believe is happening in your application is that, the variable you are using is changed from the required data type of the field. You will experience the "Multi" step error when you attempt to do the following:

  • Assign a string to a Integer column value.
  • Assign a null to an integer column value where the column cannot be null.
  • Assigning a value that is too long for the underlying column in the database.

You might want to use a type conversion prior to assigning the variable.

Answered By 0 points N/A #101759

Multi step operation generated an error.

qa-featured

You need to be very careful of the data types in Classic ASP 3.0. This is because the variables itself gets its type from the values assigned. You have to use type conversions where ever possible. For example, if you are presumably comparing two integer values, it is always a good practice to use the "cint" function to convert the variables and then compare. Likewise you get many other similar functions such as:

  • cint – convert to integer
  • csng – convert to single
  • cstr – convert to string
  • cdbl – convert to double
  • cdate – convert to date

With the latest version of Microsoft Data Access Components, comparisons have become strict, so that unless you cast and compare, you will get unpredictable results.

Answered By 270 points N/A #101760

Multi step operation generated an error.

qa-featured

I converted the variable and now the error is no more! Seems like there has been a Microsoft Windows Update on the servers that had upgraded the Microsoft Data Access Components. This may have lead to the error message that previously did not occur. I have advised my programmers to check and do the required type conversions where possible. Thank you experts for solving my problem!

Login/Register to Answer

Related Questions