Results 1 to 3 of 3

Thread: [RESOLVED] The conversion of the nvarchar value overflowed an int column.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2012
    Posts
    119

    Resolved [RESOLVED] The conversion of the nvarchar value overflowed an int column.

    This is the error
    Code:
    com.microsoft.sqlserver.jdbc.SQLServerException: The conversion of the nvarchar value '8737383838' overflowed an int column.
    I'm putting the value integer into bank account number column.

    Code:
    statement.setString(10,acnotxtfield.getText());
    Using prepared Statement.

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: The conversion of the nvarchar value overflowed an int column.

    Not sure where... but it would seem that at some point in the process, the string is being (or attempted to) converted into an int, and the number is too big to be an int. I would look at the table definition, as well as the SQL statement.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2012
    Posts
    119

    Thumbs up Re: The conversion of the nvarchar value overflowed an int column.

    Quote Originally Posted by techgnome View Post
    Not sure where... but it would seem that at some point in the process, the string is being (or attempted to) converted into an int, and the number is too big to be an int. I would look at the table definition, as well as the SQL statement.

    -tg
    Yes that was the problem I have changed my data type from int to big int,now it's fine
    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width