Dan Guzman
3/18/2007 2:43:00 PM
The immediate cause of this error is a is a malformed string passed to the
String.Format method in your code. For example, the following will cause
the error because the token is specified as "{0)" instead of the proper
"{0}":
string errorExample = String.Format("{0)", "my value");
Since you posted this to a SQL forum, I assume you suspect the error is
related to SQL Server. Perhaps the format error is occurring in a catch
block and obfuscating the actual SQL error.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Shyam" <Shyam@discussions.microsoft.com> wrote in message
news:0C3B8F8A-4172-45AA-9E08-B8A48DCA5E4E@microsoft.com...
> Hi all,
>
> I'm facing this Error in my application once in a while and once the
> app.jobs are re-run it might/might not finish successfully. The SP's are
> upto
> date. Any quick solution/ help is very much appreciated.
>
> ERROR:
> Input string was not in a correct format.
> at System.Text.StringBuilder.FormatError()
> at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String
> format, Object[] args)
> at System.String.Format(IFormatProvider provider, String format, Object[]
> args)
> at System.String.Format(String format, Object arg0)
>
>