hi,
i want to insert the record to a table using stored procedure.when i insert ithe record 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 the input string was not in a correct format error will occur.can anyone help me.
i want to insert the record to a table using stored procedure.when i insert ithe record 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 the input string was not in a correct format error will occur.can anyone help me.
Jaganathan BantheswaranPosted Feb 24, 2011, 5:01 AM
As paul said, Its seems to be better if you change the phnumber datatype as varchar. because you are not going to do sum calculation on phone numbers i guess.
Jean PaulPosted Feb 24, 2011, 4:57 AM
You can try the following - make the datetime columns nullable and try passing null
Another suggestion is that:
There is no need to make phone number as bigint – usually value types are used when arithmetic calculations or speed of access situations arises. In the above case the 044 won't get stored – 0 will be ommitted.
Rajesh SPosted Feb 24, 2011, 9:28 AM
check your input for field of 'annualincome'. you have given the value 2,00,000 for annualincome, but your datatype is int so int datatype does not accept comma(,). it accepts only numbers so try to give the numeric values or else you wont..
my suggestions may be helpful for you..
thank you
Jaganathan BantheswaranPosted Feb 24, 2011, 4:44 AM
Can you figure out in which field its giving error.?