exception data in DB

  • Hello all,
    I have this exeception, please how to solve this?

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Data.SqlClient.SqlException: Error converting data type nvarchar to float.
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
     at Geotek.BetonSantrali.KontrolPanel.Insert_Update_ManuelKayit(String M_Agrega1, String M_Agrega2, String M_Agrega3, String M_Agrega4, String M_Agrega5, String M_Agrega6, String M_Cimento1, String M_Cimento2, String M_Cimento3, String M_Cimento4, String M_Su1, String M_Su2, String M_Katki1, String M_Katki2, String M_Katki3, String M_Katki4) in C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALİ\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs:line 1586
     at Geotek.BetonSantrali.KontrolPanel.timerUretimSonucKayit_Tick(Object sender, EventArgs e) in C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALİ\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs:line 1549
     at System.Windows.Forms.Timer.OnTick(EventArgs e)
     at System.Windows.Forms.Timer.TimerNativewindow.WndProc(Message& m)
     at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    Thanks for your help

  • cavepoubelle - Saturday, October 21, 2017 8:07 AM

    Hello all,
    I have this exeception, please how to solve this?

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Data.SqlClient.SqlException: Error converting data type nvarchar to float.
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
     at Geotek.BetonSantrali.KontrolPanel.Insert_Update_ManuelKayit(String M_Agrega1, String M_Agrega2, String M_Agrega3, String M_Agrega4, String M_Agrega5, String M_Agrega6, String M_Cimento1, String M_Cimento2, String M_Cimento3, String M_Cimento4, String M_Su1, String M_Su2, String M_Katki1, String M_Katki2, String M_Katki3, String M_Katki4) in C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALÄ°\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs:line 1586
     at Geotek.BetonSantrali.KontrolPanel.timerUretimSonucKayit_Tick(Object sender, EventArgs e) in C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALÄ°\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs:line 1549
     at System.Windows.Forms.Timer.OnTick(EventArgs e)
     at System.Windows.Forms.Timer.TimerNativewindow.WndProc(Message& m)
     at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    Thanks for your help

    The error is in the first line: Error converting data type nvarchar to float.
    So you need to address something with data types - maybe a cast or convert to explicitly convert a data type. Pretty much all we would be able to tell you as we only know about the error message and nothing else.

    Sue

  • thanks Sue, this error appears when launching an application that connects to a SQL database.

  • cavepoubelle - Saturday, October 21, 2017 9:21 AM

    thanks Sue, this error appears when launching an application that connects to a SQL database.

    That fact doesn't change the source of the error.  You have some NVARCHAR data that's being converted to FLOAT somewhere along the line and at least one instance of that has an NVARCHAR value that cannot be converted to FLOAT.  The Devil's in the Data on this one.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • cavepoubelle - Saturday, October 21, 2017 9:21 AM

    thanks Sue, this error appears when launching an application that connects to a SQL database.

    It's still looks to be something from the application even though it's a SQL Exception. Have you looked at the application code and what is pointed to in the error:

    Geotek.BetonSantrali.KontrolPanel.Insert_Update_ManuelKayit(String M_Agrega1, String M_Agrega2, String M_Agrega3, String M_Agrega4, String M_Agrega5, String M_Agrega6, String M_Cimento1, String M_Cimento2, String M_Cimento3, String M_Cimento4, String M_Su1, String M_Su2, String M_Katki1, String M_Katki2, String M_Katki3, String M_Katki4) in C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALÄ°\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs:line 1586
     at Geotek.BetonSantrali.KontrolPanel.timerUretimSonucKayit_Tick(Object sender, EventArgs e) in C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALÄ°\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs:line 1549

    KontrolPanel.Insert_Update_ManuelKayit
    C:\Documents and Settings\halime\Desktop\GEOTEK BETON SANTRALÄ°\Geotek.BetonSantrali\Geotek.BetonSantrali\KontrolPanel.cs

    Sue

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply