473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Strange problem while updating

375 256MB
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
4 1546
markmcgookin
648 Expert 512MB
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
cmrhema
375 256MB
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
cmrhema
375 256MB
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
willakawill
1,646 1GB
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

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

Similar topics

2
by: Hal Vaughan | last post by:
First, I am aware of both SwingUtilities.invokeLater(), and of using Thread to create a new thread.  These are part of the problem. I want to have something running in the background, while the...
2
by: bogdan | last post by:
Hi All, I have updated today two of the machines with the recent hot fix and after rebooting, my usually properly working script opening file for reading stopped working. I have following ...
3
by: Bucko | last post by:
How important do you guys feel locking a database is while updating/adding information? Do you do it with every app you make? Only very high volume (traffic) apps? I'm trying to decide if my app...
2
by: Sammy | last post by:
Everyone, I have this very strange problem and we spent weeks to figure out what's going on. Let me outline the configuration of our system: 1. .NET Framework v. 1.0.3705 2. SQL 2000 SP 3...
2
by: Alexey.Murin | last post by:
The application we are developing uses MS Access 2003 database (with help of ADO). We have noticed that during massive records updating the size of the mdb file increases dramatically (from 3-4 to...
2
by: tommydkat | last post by:
Hi! I'm updating a Windows application that we develop that uses a DB2 database. We switched from using Microsoft Developer Studio 6 to Visual Studio .Net 2003 to build our app and since that...
8
by: mantrid | last post by:
Hello Im having problems working out why the following code does not work. I dont think its the sql as the error occurs on the first update which ever one is put there ($q1 or $q2). Ive swapped...
1
by: pitjpz | last post by:
We have moved our Database to another server. The server it was on used SQL 4 and the new one its on now uses SQL5 the only problem we can find is that when you attempt to delete a record from...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.