Results 1 to 5 of 5

Thread: "Variable Already Typed" error on UX Component's submitDialog POST request

  1. #1
    Member
    Real Name
    Zach White
    Join Date
    Feb 2017
    Posts
    7

    Default "Variable Already Typed" error on UX Component's submitDialog POST request

    I've got a form that is bound to several tables, and it seems to save fine, until I set one specific value.

    This one value is calculated based on the value to two other fields in the component, so when one field gets changed, I have an XBasic function set the new value. But as soon as that happens, I can no longer save the form, and my POST request receive this response:

    A5DotNetReentry.XBasicErrorException: Variable already typed

    Internal Error 500
    Error setting variable name: _state.__args_n_enumber (__args_n_enumber)
    System.ApplicationException: Error setting variable name: _state.__args_n_enumber (__args_n_enumber) ---> A5DotNetReentry.XBasicErrorException: Variable already typed
    at A5DotNetReentry.XBasicObject.SetMember(String Name, Object Value)
    at A5IISManagedPlugin.A5WWorker.AddRequestVariablesToVariableFrame(IEnumerable`1 NameValues, XBasicObject Frame, XBasicSession Session)
    --- End of inner exception stack trace ---
    at A5IISManagedPlugin.A5WWorker.AddRequestVariablesToVariableFrame(IEnumerable`1 NameValues, XBasicObject Frame, XBasicSession Session)
    at A5IISManagedPlugin.A5WWorker.ExecuteEvaluateA5W(String PageDirectory, String PageName, String PageContents, HttpContext Context, HttpResponse Response, HttpRequest Request)
    at A5IISManagedPlugin.A5WWorker.ExecuteRequestImpl()

    What is happening here? And how can I fix it?

  2. #2
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,002

    Default Re: "Variable Already Typed" error on UX Component's submitDialog POST request

    I think you would get a better answer posting your xbasic for a possible error there...have you used the debugger to step through the code?
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  3. #3
    Member
    Real Name
    Zach White
    Join Date
    Feb 2017
    Posts
    7

    Default Re: "Variable Already Typed" error on UX Component's submitDialog POST request

    The problem arises after this function:


    Code:
    function rateTotal as v (e as p)
    	
    	dim cn1 as sql::Connection
    	dim sqlCommand1 as C
    	dim args1 as sql::Arguments
    	
    	dim rate_c as c = e.dataSubmitted.rate
    	dim rate as n = convert_type(rate_c, "n")
    	dim pgs_c as c = e.dataSubmitted.filePrepPP
    	dim pgs as n = convert_type(pgs_c, "n")
    	
    	dim totalPrice as n = rate * pgs
    	
    	e.control.lineTotal = totalPrice
    	
    end function
    This function is called by an Ajax Callback after the Rate field is changed.

  4. #4
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,002

    Default Re: "Variable Already Typed" error on UX Component's submitDialog POST request

    This can't be the whole thing...
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  5. #5
    Member
    Real Name
    Zach White
    Join Date
    Feb 2017
    Posts
    7

    Default Re: "Variable Already Typed" error on UX Component's submitDialog POST request

    But it's not in any XBasic I've written. I haven't written any customized submitDialog. The variable referenced in the error is an argument for filtering a list control on a UX component in another tab on my page.

Similar Threads

  1. Replies: 2
    Last Post: 09-04-2014, 05:25 PM
  2. "Object Is Not Defined" Error When I Use "Close Form" in the "OnInit"
    By nigeldude in forum Alpha Five Version 11 - Desktop Applications
    Replies: 5
    Last Post: 03-23-2013, 05:22 AM
  3. Variable "request" not found
    By richardurban in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 08-16-2012, 08:33 PM
  4. Error: Variable "request" not found in a5ws_Login_User
    By rgbohio in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 03-23-2012, 02:30 PM
  5. Error "cannot open table to post to"
    By bwedmands in forum Alpha Five Version 10 - Desktop Applications
    Replies: 2
    Last Post: 04-13-2010, 02:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •