Toad World® Forums

Input String Format Error


#1

SELECT TOP 10 *

FROM

CSG.dbo.CSG_SPAS

Hi,
I have read some other postings about this error, however, I am only getting this error when I try to run a query (whether it is built using the Editor or Builder produces same error). I have tried the different suggestions including the international regedit to modify the key to be blank. Nothing seems to touch it. However, if I run the query in another program, like Forest and Trees from CA, it runs just fine. I am using an ODBC connection to an MS SQL Server.

Here is my query:

Here is the Error:
System.FormatException
Input string was not in a correct format.
Stack Trace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at Quest.Toad.NativeOdbc.UnManagedColumnDescriptor.GetBufferDataAsDecimal(UInt16 rowOffset)
at Quest.Toad.NativeOdbc.OdbcDataReader.GetValue(Int32 i)
at Quest.Toad.Db.Connection.ReadRow(IDataReader reader, FastTable datatable, FastReadOptions options, PrePostProcessHandler prePostProcessHandler)
at Quest.Toad.Db.ToadDataAdapter.InternalReadBackground()


#2

Which version of TDA are you running? I was able to reproduce the exception when open a table with numbers in 2.6 release. However, our latest code works fine. We are going to post our 2.7 beta soon. Please try it see if it resolves your issue. If it persists, we may need your table DDL and some sample data to work on this issue further.

Message was edited by: Kiki


#3

Jim,
If you are not using TDA freeware, you should be able to connect to the MS SS via the native provider instead of ODBC. When you create the connection, select “SQL Server” group instead of ODBC, and enter the server information. I have no problem to access the table when using native connection.

Hope this helps.


#4

I tried what you said, however, my Control Panel Data Sources connection is using the SQL Server driver and I have SQL Server checked in AutoCommit (it is the only one checked). In SQL Server options I dropped down the Default ODBC Driver to SQL Server. I am still getting the error even when I simply pull a Select * From TABLE. Nothing fancy, very straight forward.

I right clicked on a table, said View Details, and then I cliked on the “Data” tab in the Viewer Table and get the error again. It is very odd.

System.FormatException

Input string was not in a correct format.

Stack Trace:

at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)

at Quest.Toad.NativeOdbc.UnManagedColumnDescriptor.GetBufferDataAsDecimal(UInt16 rowOffset)

at Quest.Toad.NativeOdbc.OdbcDataReader.GetValue(Int32 i)

at Quest.Toad.Db.Connection.ReadRow(IDataReader reader, FastTable datatable, FastReadOptions options, PrePostProcessHandler prePostProcessHandler)

at Quest.Toad.Db.ToadDataAdapter.InternalReadBackground()


#5

It seems that you are still using ODBC. Try creating a new connection in Toad. Do not select ODBC but choose the SQL Server type shown in the screenshot. We can reproduce your issue here using ODBC and when using the SQL Server native conneciton type we do not get this error.

Debbie
SSConnection.png


#6

Thank you very much Debbie! That worked. The visual was SUPER helpful. Thank you again.

Jim