Dear Sir/Madam,
I have a web application, which worked perfectly on our QA environment. But I moved the application without changing anything to the code to our live server and suddenly I get the following error on my beginning page:
---------
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
----------
The only difference between those servers is that on the live server is service pack 4 of win2000 installed and on the other isn't.
The thing I'm trying to do in the code, where it fails according to me, is
--------------
Sub Load_Repeater()
'Connect to the database
oAS400Conn.Open()
'Make the select statement to get the groups
Dim sSelectSQL As String
sSelectSQL = "select FRGRPC, FRNAME, FRMODF, FRTYPE from COGDTA.SKUFRANP where FRBRND = 'EL' order by FRNAME"
Dim cmdSelect As New OdbcCommand(sSelectSQL, oAS400Conn)
Dim daGroup As New OdbcDataAdapter(cmdSelect)
Dim dsGroup As New DataSet
daGroup.Fill(dsGroup, "Groups")
Groups.DataSource = dsGroup.Tables("Groups").DefaultView
Groups.DataBind()
oAS400Conn.Close()
End Sub
----------------
And in the HTML:
---------------
...
<%# Container.DataItem("FRGRPC") %>
...
---------------
The FRGRPC is a numeric.
Has anyone had this problem before. The strange thing is that I'm not having it on QA and sometimes in the live environment it works as well. It seems to pop up this message randomly.
Thank you for your help.
Jelle
I have a web application, which worked perfectly on our QA environment. But I moved the application without changing anything to the code to our live server and suddenly I get the following error on my beginning page:
---------
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
----------
The only difference between those servers is that on the live server is service pack 4 of win2000 installed and on the other isn't.
The thing I'm trying to do in the code, where it fails according to me, is
--------------
Sub Load_Repeater()
'Connect to the database
oAS400Conn.Open()
'Make the select statement to get the groups
Dim sSelectSQL As String
sSelectSQL = "select FRGRPC, FRNAME, FRMODF, FRTYPE from COGDTA.SKUFRANP where FRBRND = 'EL' order by FRNAME"
Dim cmdSelect As New OdbcCommand(sSelectSQL, oAS400Conn)
Dim daGroup As New OdbcDataAdapter(cmdSelect)
Dim dsGroup As New DataSet
daGroup.Fill(dsGroup, "Groups")
Groups.DataSource = dsGroup.Tables("Groups").DefaultView
Groups.DataBind()
oAS400Conn.Close()
End Sub
----------------
And in the HTML:
---------------
...
<%# Container.DataItem("FRGRPC") %>
...
---------------
The FRGRPC is a numeric.
Has anyone had this problem before. The strange thing is that I'm not having it on QA and sometimes in the live environment it works as well. It seems to pop up this message randomly.
Thank you for your help.
Jelle