in sql i create the table in this table i specify the datatype as an int for three fields such as phonenumber,mobilenumber and annual income.for insertion i used the stored procedure.
in .net cs page i pass the textbox value as a parameter .
cmd.Parameters.Add(
cmd.Parameters[2].Value =
when i used this the error value was either too large or too small for an int error will occur how can i solve this.
Thaks
Convert.ToInt32 (phonenmbr.Text);"@phnmber", SqlDbType.Int);
Jaganathan BantheswaranPosted Feb 24, 2011, 1:58 AM
Range of the Int in SQL is given below.
int
Range: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)
Space: 4 Bytes
so if you use 9034XXXXXX like this sure you will get error.
Try this.
bigint
Range: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)
Space: 8 Bytes
krithika muthukrishnanPosted Feb 24, 2011, 2:35 AM
ya it works well,i have one more error that is input string was not in a correct format. error will occur,i didn't know why this error will occur.here i specify the datatypes are
field name datatype (Input given)
companyname----->varchar----->south nest
companymailid----->varchar--->[email protected]
phonenmber-------->bigint---->044569874
mobilenumber------>bigint---->987456321
functionalarea----->varchar---->IT
keyskill----->varchar--->.net,sql
qualify----->varchar---->BE,MCA,M.Sc
experience--->nchar--->fresher,1+
annualincome---->int--->2,00,000
description---->varchar---->having good knowledge in sql
location--->varchar---->chennai
lastdate---->date/time--->by using now function it loaded
posteddate--->date/time---->2/2/2011
likewise the inputs are given but why th input string was not in a correct format error will occur.can anyone help me.