exception data in DB

  • cavepoubelle

    SSC Rookie

    Points: 45

    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

  • Sue_H

    SSC Guru

    Points: 90011

    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

  • cavepoubelle

    SSC Rookie

    Points: 45

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

  • Jeff Moden

    SSC Guru

    Points: 994284

    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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

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

  • Sue_H

    SSC Guru

    Points: 90011

    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 5 (of 5 total)

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