Input string was not in a correct format -- occurs regularly with 4.5 and 4.6

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
kafkawasnotdreaming
Posts: 2
Joined: Mon 31 Mar 2008 07:03

Input string was not in a correct format -- occurs regularly with 4.5 and 4.6

Post by kafkawasnotdreaming » Mon 05 May 2008 02:40

I have released a program under .Net using OraDirect 3.x libraries. I recently updated OraDirect to 4.5 and then 4.6 I am having a regular problem with many machines at my corporate sites:

Input string was not in a correct format

.. on any call to OracleTable.Open() or OracleReader.ExecuteScalar()

We use imaging to create our desktops, so all machines are configured the same -- at least theoretically. In practice, as we can see, the OraDirect libraries are having trouble with certain machines.

I have removed my code and installed the VS.Net compiler and all libraries on several of the machines that are failing. I have dropped an OracleConnection, OracleTable and GridControl onto a blank form. From there I try to fill the table and fill the grid.

They continue to fail. Therefore I have not created this problem myself; it is occurring because the OraDirect libraries are not safe under Dot Net 2.0 and Windows XP.

I need your urgent assistance, as I convinced management that this product was safe and reliable. Please do not make a fool out of me.

Thank you in advance.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 05 May 2008 14:33

Could you please send me database objects' definition script?
We cannot determine the reason of the problem.
We will put a priority on your request.
Which Oracle server do you use?
Could you please provide a test project and send it to alexeyman*crlab*com?

kafkawasnotdreaming
Posts: 2
Joined: Mon 31 Mar 2008 07:03

Still awaiting assistance after many emails

Post by kafkawasnotdreaming » Mon 12 May 2008 04:26

My email history to date:

------------------------------------------------------------------------------------
5/5/2008, 10:01 a.m.:
------------------------------------------------------------------------------------

I sent you an email attachment called WindowsApplication4 to demonstrate the problems.

This program is made up of nothing: I just create a form and drop a connection and table onto it. I connect successfully to my database. I then try to open the table. On half of my test machines, I fail with the error indicated. On my own development machine and a few others, I succeed.

Because this is no longer a "program", but simply a Windows Forms Designer test, and because the problem seems to occur randomly, it cannot be a coding problem. It is a problem with the overall compatibility of OraDirect in random environments, where certain very small features of the operating systems and Dot Net installations are causing crashes. I thought this might ring a bell with you.

If I can't fix this, I have to go back to version 3.x of OraDirect, which seems a tragedy. Also, it won't help you out when the next client calls with the same problem. And they will. Cisco is a highly standardized environment. If this problem occurs here, it will occur elsewhere in other situations.

------------------------------------------------------------------------------------
5/6/2008, 6:39 p.m.:
------------------------------------------------------------------------------------

I attached an error trace, but it did not show anything about the OraDirect part of the error. I have already set the appropriate VS.NET options, as you prescribed.

Attached please find the error trace. The error occurs whenever we try to use OraDirect's library. So I am certain it is not the form, or a grid, etc., causing the problem. It occurs right inside the designer.

Another note on one of the failed machines: it cannot run the OraDeveloper tools. Whenever those tools are called, it issues "Failed to retrieve required server information". On my development machine, it works fine.

Do you have DEBUG version of the libraries? I am in a tight spot.

------------------------------------------------------------------------------------
5/7/2008, 12:14 p.m.:
------------------------------------------------------------------------------------

I have retrograded my CoreLab OraDirect libraries to version 3.55.26. When trying to build an OracleDataTable, I still fail with "Input String Not In A Correct Format", as previously reported. I also fail when trying to run the equivalent of ExecuteScalar.

HOWEVER, I can successfully build either an OracleDataAdapter or OracleDataReader, and I get NO ERRORS. This is also proven because I have existing code that uses these two components, and it has run on 2,000 laptops for over 18 months.

The problems with the new libraries is extremely serous. Please take this as further proof that the problem is very real, and has occurred since the development of the new libraries.

------------------------------------------------------------------------------------
5/8/2008, 2:03 a.m.:
------------------------------------------------------------------------------------

On further research today on one of my failing computers, I just grabbed some code from the help system and ran it:


Dim myCommand As OracleCommand = New OracleCommand(countTable.Count_Command, oracleConn)
myCommand.CommandType = System.Data.CommandType.StoredProcedure
'Prepare parameters manually
'Dim myInParam As OracleParameter = myCommand.Parameters.Add("JobParam", "SALESMAN")
Dim myReturParam As OracleParameter = New OracleParameter()
myReturParam.Direction = System.Data.ParameterDirection.ReturnValue
myCommand.Parameters.Add(myReturParam)
'Execute the function and render result
myCommand.ExecuteNonQuery()


It so happens that the code cannot run because it has the wrong number of parameters for the stored procedure it is calling. So when I run it on my development machine, I get the "wrong parameters" error.

On ,my failing machne, I get the infamous "Input String was not in a correct format"... !!!

Here is the stack trace:

StackTrace " at CoreLab.Oracle.OracleCommand.a(Boolean A_0, Int32 A_1, Int32 A_2)
at CoreLab.Common.DbCommandBase.c(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteReader()
at CoreLab.Oracle.OracleCommand.ExecuteNonQuery()
at CAPPS_Data.CAPPS_Connection_Oracle_Abstract.GetTotalRecordCount(CAPPS_Data_Table_DB_Interface countTable, String userID) in C:\Documents and Settings\lrobbins\My Documents\Visual Studio 2005\CAPPS\CAPPS_DATA\CAPPS_0301_Connection_Oracle_Abstract.vb:line 247" String
1:44:33 AM


Here is the value for countTable.Count_Command:

ESIBADM.CAPPS_PKG.CAPPS_USER_COUNT

Is it a problem that I am referring to a package? In order to see the package, I must click "All" in the database tools. Is there a problem resolving the package? Is it legal to have a period in the comand text? Three of seven machines are failing at this point, and all were imaged and built by Cisco's IT department.

Can you send me sample code? A debug version of the libraries? I am desperately in need of assistance.

------------------------------------------------------------------------------------
5/8/2008, 2:44 p.m.:
------------------------------------------------------------------------------------

I was just playing around with some old code that used to work on all of my machines. I forget to install Syncfusion's libraries, and lo and behold , Syncfusion issued me this error:

"Input String was not in a correct format"

But this time I saw a complete stack trace. Syncfusion was trying to read the LICENSE FILE and could not parse the string.

Is it possible that CoreLab OraDirect is also trying t read my license file, and there is a problem on *some* machines with how strings are parsed? I always take get the license by dropping a component onto a blank form, then copying the licenses.licx contents into my other license files. In this way, I am sure never to alter the way your installation routines wish to see the license. Under normal circumstances, this works fine. But maybe this is what is filing on my two test machines that will not run OraDirect.

Can you propose a test to see how we can confirm whether the license is being read correctly?

I need your assistance, Alexey, please help.


[/b]

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 12 May 2008 10:11

I have replied you by email. Did you receive custom libraries?
Can you propose a test to see how we can confirm whether the license is being read correctly?
Regarding your previous emails and call stacks, it's not likely the problem is in the licensing.
It's more possible that the bug is in the components.
A full stack trace will definitely point to the place of the exception.

Post Reply