Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conversion Error...

Status
Not open for further replies.

AppzDev

MIS
Oct 9, 2002
57
0
0
US
I am getting the following message.

The conversion of the varchar value '10350256701' overflowed an int column. Maximum integer value exceeded.

I am trying to select a person and view 2 fields. The number above is their p_id. It's a varchar(20) datatype.

Can someone that has run into this problem assist me in making this work w/o having to physically go into the Database and change p_id values.

Thank You,

dc~
 
If I understand the problem correctly: you have a database field that is a varchar(20) that you want to show it.

Can you change the int column (variable?) to read it as a string? Why do you need for it to be an int?
 
I am trying to show 2 fields in a datagrid. I made the p_id field a varchar(20) in the SQL database b/c in the future, alphanumeric id's may be assigned. However, when i try to "run" the datagrid, i get the error i posted above. The datagrid is simply grabbing 2 fields from the database and displaying them. If i change the p_id of this person to something like "12345" it works fine. I've read something about int size etc, but i'm not sure why it's trying to convert the varchar(20) p_id to an int. I'm still fairly new at the whole asp.net so please forgive my ignorance.

Thanks,

dc~
 
It sounds like the datagrid column that is meant to show the p_id field has been set up as an int column. You need to change this to be a varchar column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top