• 0
Sign in to follow this  
Guest - dani -

Microsoft Jscript (0x800a138f)

Question

Guest - dani -

Olá estou a ter este erro:

Tipo de erro:

Erro em tempo de execução do Microsoft JScript (0x800A138F)

'MM_fields.length' é nulo ou não é um objecto

personaldata.asp, linha 55

a linha 55 é a que esta a bold , alguém sabe qual é o problema? alguém me sabe explicar porque está a dar este erro? Dá para resolver?Obrigado

if (String(Request("MM_insert")) != "undefined") {

  // create the sql insert statement

  var MM_tableValues = "", MM_dbValues = "";

  for (var i=0; i+1 < MM_fields.length; i+=2) {

    var formVal = MM_fields[i+1];

    var MM_typesArray = MM_columns[i+1].split(",");

    var delim =    (MM_typesArray[0] != "none") ? MM_typesArray[0] : "";

    var altVal =  (MM_typesArray[1] != "none") ? MM_typesArray[1] : "";

    var emptyVal = (MM_typesArray[2] != "none") ? MM_typesArray[2] : "";

    if (formVal == "" || formVal == "undefined") {

      formVal = emptyVal;

    } else {

      if (altVal != "") {

        formVal = altVal;

      } else if (delim == "'") { // escape quotes

        formVal = "'" + formVal.replace(/'/g,"''") + "'";

      } else {

        formVal = delim + formVal + delim;

      }

    }

    MM_tableValues += ((i != 0) ? "," : "") + MM_columns;

    MM_dbValues += ((i != 0) ? "," : "") + formVal;

  }

  MM_editQuery = "insert into " + MM_editTable + " (" + MM_tableValues + ") values (" + MM_dbValues + ")";

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this