Phone Number cuts off last 2 characters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Seth Williams

    #1

    Phone Number cuts off last 2 characters

    I've got a strange problem - - I've got an input form (members), which has
    standard data, name, address, phone, etc
    I've changed the table now, so that the phone number accepts a varchar(25) -
    I upped it since I was only accepting 10 digits, and forgot about dashes,
    etc.....
    then, I also have the same in the stored procedure

    I have an XSD file, and a .vb file in which I'm calling the method from the
    vb file - -

    However, it always cuts off the last two characters of the phone number when
    it inserts.

    Ideas on why this might be happening (vs.net 2008)


  • Hans Kesting

    #2
    Re: Phone Number cuts off last 2 characters

    It happens that Seth Williams formulated :
    I've got a strange problem - - I've got an input form (members), which has
    standard data, name, address, phone, etc
    I've changed the table now, so that the phone number accepts a varchar(25) -
    I upped it since I was only accepting 10 digits, and forgot about dashes,
    etc.....
    then, I also have the same in the stored procedure
    >
    I have an XSD file, and a .vb file in which I'm calling the method from the
    vb file - -
    >
    However, it always cuts off the last two characters of the phone number when
    it inserts.
    >
    Ideas on why this might be happening (vs.net 2008)
    Where are those characters cut off? In your C# code or when it is
    stored in the database? What do you see when you follow the value with
    the debugger?
    How are you inserting this value in the database?
    Did you forget to increase the size of the SqlParameter in your C# code
    or in the stored procedure (if you use that)?

    Hans Kesting


    Comment

    Working...