[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1110
  • Last Modified:

ASP.Net PopUp error

I am getting a pop up, Error from WebPage.
I cannot find the source of the error.
The code behind is VB and I am using javascript and devexpress
we just upgraded from devexpress 9.3 to 12.1.5


I get the error in this case
i0550n27b is not a valid value for an int32

i0550n27b is an item number, all item numbers are stored as a string/char(12) in sql

i never get this error if i use an item no that is strictly number based but if i use this one or an item with a - like 123578-2a  I get this error.

I did not get this error before the devexpress upgrade but i am lost for isoating it.
error.png
0
hainansyndrome
Asked:
hainansyndrome
  • 10
  • 4
  • 2
1 Solution
 
informaniacCommented:
Looks like value is passed to an incorrect column.

Do you hav any try catch from where this message can come?
0
 
hainansyndromeAuthor Commented:
i have put try catch in the .vb and in the javascript,
it is like after it finishes the javascript it throws this popup

the javascript file has this at the hop
function handleErrors(msg, url, linenumber) {
   
    //alert(msg + ': [' + url + ']: ' + linenumber );
    callFunctions.PerformCallback('fnLogError|' + 'Client Side: ' + msg + '|' + url + '|' + linenumber);
    return true;
}


teh rest of my javascript is a massive switch with this at the end

 default:
    alert("Something is not right")
    break;
  }
  }
catch(err)
  {
 alert(err.toString())
  }
 }




It never throws an error in the js
and i have try catches in ever .vb function and sub
0
 
hainansyndromeAuthor Commented:
discovered the cause of the error sort of

I used the on

<errors callbackErrorRedirectUrl="info.aspx"/>
this gave me



DXCallbackErrorMessage=I0550N27B+is+not+a+valid+value+for+Int32.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
informaniacCommented:
Glad that you found the issue. :)
0
 
hainansyndromeAuthor Commented:
well i still dont know what control is causing it or how to fix it
step by step
0
 
Alan WarrenCommented:
The SQL is expecting an input param of type INT, you are passing in a char(12), you could modify your SQL to expect a char(12) input param for the item number.

Not sure of the input param name, possibly something like @ItemNum INT, change to @ItemNum char(12)

If you are using a SqlDatasource, check the input paramaters are type="String" for the item number input.

Alan
0
 
hainansyndromeAuthor Commented:
the item num is not being pulled from sql as an INT,
in the popup the item is input as text and placed in a gridview

only when closing the popup with the gridview is anything blowing up

the data is looked up using linq to sql calling a stored produre
i have verified that in the data context it is mapped as a string
0
 
Alan WarrenCommented:
The message seems to indicate that the UpdateParameter name="Item No" has a Type="Int32" assignation. Not sure how UpdateParameters are defined using Linq, but that seems to be the place to look.

Alan
0
 
hainansyndromeAuthor Commented:
I checked all the linq files
the Item_NO is a string there


to clarify from earlier if you input this item number
i0550n27b
1) it validates it is a valid part and if so returns info from a look up
2) Adds it to the database
3) you can add other item no after it


4) All above is in a devex pop up that has a gridview in it, when closing the popup it them blows up


I am attaching the files
error.zip
0
 
Alan WarrenCommented:
Thanks for the code and the snapshot.
Can't see any issues in the VB.

I'm wondering about this clientside call to RowClick_gvSupersession invoked by the gridview gvSupersession in the popup. Thinking that the clientside may be having a bit of hiccup with the visibleIndexes of gvCartSummary, the indexes being 0, 2 and 5 respectively.

Suspect the clientside procedures that are handling index 0 (item_num) are possibly attempting to parse the item_num by index into the incorrect destination field.

Alan
0
 
hainansyndromeAuthor Commented:
hmmmmmmmmmmm
intesting
i am in the office today Ill look into that

although i dont think we are using the supersession, anymore
0
 
hainansyndromeAuthor Commented:
nothign works


I even took production code that worked
verified it worked in dev

copied it
re upgraded from 9.3 to 12.1.5
it failed
then tried upgrading an other copy to 11.2

version 10 is my last hope
0
 
hainansyndromeAuthor Commented:
upgraded to version 10.2
it worked

so backing up that project in case upgrading 10.2 to 11.2 fails
0
 
hainansyndromeAuthor Commented:
I have taken my original code, and upgraded it from 9.3 to 10.4
Then to 10.8
and then to 11.1
with out getting this error

it breaks in 11.2
it is something with the puCartItems
and the gvCartSummarty


problem exists between 11.1 and 11.2
0
 
Alan WarrenCommented:
Yeah it's real bummer when updates crash out a perfectly good system. They just shove them out the door with no consideration for backwards compatibility. Had an issue recently with the latest .net framework and email message .from fields, it can't be a string any-more, has to be a recipientList object; big orange screen of death when you update the framework, easy enough to fix, but where's the heads-up!

Suggest you roll back to the previous flavour and report the bug.

Respectfully yours,
Alan
0
 
hainansyndromeAuthor Commented:
i found the reason is with the way devexpress did its updates
there is not code fix
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 10
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now