By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

Strange problem while updating

100+
P: 375
Hello All
I am having a peculiar problem. I am using vb6.0 backend sql server and ado connection.
I can insert records, delete and modify records.
My table is called investmentdetails it consists of
field/datatype/length
fdno char 25
fholder char 20
and many others.
While modifying a record I use a combo box which consists of fdno . I populate using add item method. While using the keyup event of combo box all the fields gets displayed along with the respective fdno.
One of the fdno has the value 2277030000008259.
The record has been properly inserted.
It can be modifed as well as deleted.
But the problem occurs when I modify some fdno
When I update(modify and save) I have an error stating
Runtime error 2147467259 (80004005)
The conversion value of 2277030000008259 overflowed an int column. Maximum integer value exceeded.

Whereas there is no problem is modifying and saving other records


WHY IS IT THAT I CAN MODIFY AND UPDATE SOME BUT NOT OTHERS
PLEASE HELP ME OUT OF THIS MESS

THANKS
Mar 15 '07 #1
Share this Question
Share on Google+
4 Replies


markmcgookin
Expert 100+
P: 648
Hello All
I am having a peculiar problem. I am using vb6.0 backend sql server and ado connection.
I can insert records, delete and modify records.
My table is called investmentdetails it consists of
field/datatype/length
fdno char 25
fholder char 20
and many others.
While modifying a record I use a combo box which consists of fdno . I populate using add item method. While using the keyup event of combo box all the fields gets displayed along with the respective fdno.
One of the fdno has the value 2277030000008259.
The record has been properly inserted.
It can be modifed as well as deleted.
But the problem occurs when I modify some fdno
When I update(modify and save) I have an error stating
Runtime error 2147467259 (80004005)
The conversion value of 2277030000008259 overflowed an int column. Maximum integer value exceeded.

Whereas there is no problem is modifying and saving other records


WHY IS IT THAT I CAN MODIFY AND UPDATE SOME BUT NOT OTHERS
PLEASE HELP ME OUT OF THIS MESS

THANKS
the number 2277030000008259 is probably bigger than the max value your system can store as an int. Would it be possbile to change the properties of that column to a double instead of an int, or even a long
Mar 15 '07 #2

100+
P: 375
the number 2277030000008259 is probably bigger than the max value your system can store as an int. Would it be possbile to change the properties of that column to a double instead of an int, or even a long
But I have stored it as char and length as 25
Mar 15 '07 #3

100+
P: 375
But I have stored it as char and length as 25

Resolved the problem folks.
This is the way I retrieve the data in combo keyup event

MyRs3.Open "select * from investmentdetails where fdno ='" & Trim(cbFDNO.Text) & "' and type='Fixed'", MyCon, adOpenDynamic, adLockOptimistic

I update in command button click event as below

MyRs1.Open "select * from investmentdetails where fdno =" & Trim(cbFDNO.Text), MyCon, adOpenDynamic, adLockOptimistic


I FORGOT the ' quotes in the query near the trim function.
Hence the problem

Next time before posting I will be careful

Any way thanks
Mar 15 '07 #4

100+
P: 1,646
Well great that you worked it out and thanks for posting the solution which will be an great help for anyone following this thread
Mar 15 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.