Results 1 to 31 of 31

Thread: [RESOLVED] runtime error '6':overflow

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Resolved [RESOLVED] runtime error '6':overflow

    hi gurus..

    i need your help after a week been looking for this solution and hope i'm in the correct track.

    i run a VB6 application called CRF which i bought it from a developer. there's an interface to upload data from c: into the database (mssql).
    so the problem is right now, when i want to upload data yesterday, it prompted runtime error 6: overflow which before this it can be run successfully.

    anyone can explain to me what had happened and how to resolve it. and for your info, i haven't touch the source code because i didn't get the source code since the application purchased. when i refer to the internet, apparently the problem is with the source code. so here i don't think some command had changed right?

    i tried to reinstall the application. fortunately, the data can be uploaded but when the second time i want to do the same thing, the runtime error had prompted once again.

    what shoul i do?..
    thank you in advance.

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: runtime error '6':overflow

    this is a problem with the data supplied thru the interface. you would have sent a double value to an integer variable. so, first check your data, change it and try once again and see it..hope it will work.. and this error is not handled in your application.
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: runtime error '6':overflow

    well that happens when a variable cant contain the data which is assigned to it.
    for example, you declared a variable a as integer and you did something like
    a = 10 / 3
    this one returns an error because that computation does not return an integer. it returns a double.


    so therefore, the problem is with the source code.
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  4. #4
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: runtime error '6':overflow

    Quote Originally Posted by d3gerald
    well that happens when a variable cant contain the data which is assigned to it.
    That is true.
    Quote Originally Posted by d3gerald
    for example, you declared a variable a as integer and you did something like
    a = 10 / 3
    this one returns an error because that computation does not return an integer. it returns a double.
    Your example is not true. If a is an integer, your example would return 3 without causing an error. VB will 'coerce' the return value to fit the declared data type if it can. If it can't, then you will get an error. For example:
    VB Code:
    1. Dim a as Integer
    2. a = 65535
    This would cause an error because an integer (in VB speak) can only hold numbers between -32768 and +32767.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  5. #5
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: runtime error '6':overflow

    ohh, sorry, i haven't worked with integers nowadays.
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    Quote Originally Posted by ganeshmoorthy
    this is a problem with the data supplied thru the interface. you would have sent a double value to an integer variable. so, first check your data, change it and try once again and see it..hope it will work.. and this error is not handled in your application.
    thank you sir for your reply. i really appreciate it.

    what do you mean by double value of integer anyway, sir? is it while upload the data, there are duplicates data? i've checked and retried however the error is still appear.

    glad to hear it is nothing to do with the source code because i never know bout it

    i also tried with a couple of another data..but still got the same error.

    what should i do next?

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    Quote Originally Posted by pnish
    That is true.
    Your example is not true. If a is an integer, your example would return 3 without causing an error. VB will 'coerce' the return value to fit the declared data type if it can. If it can't, then you will get an error. For example:
    VB Code:
    1. Dim a as Integer
    2. a = 65535
    This would cause an error because an integer (in VB speak) can only hold numbers between -32768 and +32767.
    ermm..you're saying here is something to do with the source code right?

    but how come before this, without i know bout the source code which i didn't get it earlier as well, the upload function can be run?

    or is it updates or patches issue?

  8. #8
    Member
    Join Date
    Mar 2006
    Posts
    55

    Re: runtime error '6':overflow

    It could also be because you're passing too much data in, so you could try splitting up a file if you have a huge file you're passing to it. For example, this would cause an overflow error:

    Dim i As Integer
    Do Until i > 32767
    i = i + 1
    Loop

    If for example you're passing a large Excel or text file to your app which contains over 32767 lines in it, then you could try splitting it up. Without looking at the source code though and knowing what the app is trying to do it's all going to be guess work as to where it's falling over. Your best bet would probably be to mail the software vendors and ask them to fix their code.

  9. #9
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: runtime error '6':overflow

    or maybe the amount of data u uploaded is more than what ur app can hold or handle.check it in the documentation if any such limits have been mentioned
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    Quote Originally Posted by l12ngo
    It could also be because you're passing too much data in, so you could try splitting up a file if you have a huge file you're passing to it. For example, this would cause an overflow error:

    Dim i As Integer
    Do Until i > 32767
    i = i + 1
    Loop

    If for example you're passing a large Excel or text file to your app which contains over 32767 lines in it, then you could try splitting it up. Without looking at the source code though and knowing what the app is trying to do it's all going to be guess work as to where it's falling over. Your best bet would probably be to mail the software vendors and ask them to fix their code.

    thank u friend..

    i've tried that as well. even i tried to upload only 1 data in 1 time..
    the error still came up.

    the problem is i didnt get any support from the vendor anymore. they're gone with the wind

    or is it possible if my sql server problem? might be it is full or something? but it is a fool guess i think..

  11. #11
    Member
    Join Date
    Mar 2006
    Posts
    55

    Re: runtime error '6':overflow

    I doubt it's a database problem with an overflow error like that, but others here would know more about the database side of things so I'll let them answer that.

    Is CRF the full name of the application (or an abreviation) and do you know what the vendors name is or was? Also, what does the app do, just load a single type of file to the database (in which case is it an Excel file or something similar?) or does it grab all the files on your hard drive?

  12. #12
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: runtime error '6':overflow

    Quote Originally Posted by l12ngo
    I doubt it's a database problem with an overflow error like that, but others here would know more about the database side of things so I'll let them answer that.

    Is CRF the full name of the application (or an abreviation) and do you know what the vendors name is or was? Also, what does the app do, just load a single type of file to the database (in which case is it an Excel file or something similar?) or does it grab all the files on your hard drive?
    you are right.if problem was on the db side .the error message would come from the db i.e the error message (description) will show the error code that was encountered on the db side .but i dont think thats the problem here.so may be its a flaw in the coding itself
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

  13. #13
    Member
    Join Date
    Mar 2006
    Posts
    55

    Re: runtime error '6':overflow

    It could also be down to the actual data you're passing to it. Say for example (just working with integers again), you've been passing order numbers to the app via your file, the app could be then taking that order number and assigning it to a variable which now can no longer cope with the data because you've reached the limit (badly explained so here's an example)

    Data file 1 contains:

    OrderNo: 32764
    OrderNo: 32765
    OrderNo: 32766

    Run app and it works because it assigns the number to a variable which has been declared as an integer. Then, when you run against Data File 2:

    Data file 2 contains:

    OrderNo: 32767
    OrderNo: 32768
    OrderNo: 32769

    App will return an overflow error.

    Having said all this, this wouldn't explain why the app would run the first time after installation, but fail the second. Does the app still work if you close it then re-open it? If so it may be storing the data into a global variable, which doesn't get cleared till the app is closed.

    There's so many ways this could be failing it's going to be really tough for you I'm afraid

  14. #14

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    Quote Originally Posted by l12ngo
    I doubt it's a database problem with an overflow error like that, but others here would know more about the database side of things so I'll let them answer that.

    Is CRF the full name of the application (or an abreviation) and do you know what the vendors name is or was? Also, what does the app do, just load a single type of file to the database (in which case is it an Excel file or something similar?) or does it grab all the files on your hard drive?
    in the setup.exe the application name is CRF.exe. actually this is such a tracking system for my company to track the inventory in our warehouse. the application will upload from a notepad named MRDATA.txt from C: which the fields are OPID, Subscriber, ContractNo, Product, Media barcode, Media Name, Location code, time and date.

  15. #15
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: runtime error '6':overflow

    do you remember when it was working fine what are the data you have uploaded. if you try with same set of data are you getting errors....
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  16. #16

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    Quote Originally Posted by ganeshmoorthy
    do you remember when it was working fine what are the data you have uploaded. if you try with same set of data are you getting errors....
    last week it still work well and the data format is just the same..

  17. #17
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: runtime error '6':overflow

    i'm asking about the data not data format...please clarify, if the same data and error then you have to call the vendor, no other way (you can play with your db, but you should be careful when doing this) or if no error for same data then you have to check the data
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  18. #18

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    these are samples of the data :-

    1234 MIH OSS0000093 T MIH 00414646 SRS260505 00384898 25/02/2006 15:03:34
    1234 MIH OSS0000093 T MIH 00414645 SIGN260505 00384897 25/02/2006 15:04:01

    pls make me clear what is data and data format?

    anyway, one more thing, when i run and pull the database (sql server) locally (127.0.0.1) from my pc..the program and the upload interface run properly and the data can be uploaded succesfully..

    ???

  19. #19

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: runtime error '6':overflow

    my problem is now had settled..thanks to all the thread under this topic guys..

    there's a file in setup program didn't install together during the installation. fortunately i've copied the tiptop file so i just copy it into the folder.

    but i'm still confused why sometimes the file is missing, report cant be generated and other runtime errors in the application because i'm pretty sure i didn't touch anything since the first installation.

    apparently i need to get the coding, no matter what huh...

    anyway, thank u very much guys

  20. #20
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: [RESOLVED] runtime error '6':overflow

    fine...protect the system files, so that it will not be deleted without your knowledge
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  21. #21

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: [RESOLVED] runtime error '6':overflow

    i've got it clearly now..

    the data itself is giving me all this headache

    ermm..when i try with another stack of data..the upload process is going well..

    how can data can be currupted, anyway?? eventhough it is still with the same file??
    what can cause it?

  22. #22

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: [RESOLVED] runtime error '6':overflow

    is there any hint sir, which data can be overflow??

  23. #23
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: [RESOLVED] runtime error '6':overflow

    when a value to a variable exceeds the overflow error occurs...if you assign more than 32767 then it causes this....
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  24. #24
    New Member
    Join Date
    Dec 2010
    Location
    Orissa
    Posts
    1

    Re: runtime error '6':overflow


    if run time error -6 overflow is coming
    then
    just change the integer data type to long...........
    as a result it can hold more than 32767 data ....

  25. #25
    New Member
    Join Date
    May 2014
    Posts
    1

    Re: [RESOLVED] runtime error '6':overflow

    Quote Originally Posted by alinysyahril View Post
    which i bought it from a developer
    because i didn't get the source code since the application purchased.
    I have a similar problem with a program that was written in the late 90's. My issue turned out to be the fact that the application saves it's last screen location (Top, Left, Height, Width) to the registry and somewhere in the stream that restores the position, variables are declared as Integer. With a multi screen environment, it is pretty easy to get Left to exceed 32767, and the next time the application runs up pops the "runtime error '6': overflow". The oddest bit of this is that it doesn't seem to have any problem saving values over 32767! It seems to happen just rarely enough that I forget what the problem is and have to rediscover it every time. (the older I get the shorter that period of time is...) I'm actually posting to this thread because it is the one that shows up each time I Google the issue.

  26. #26
    New Member
    Join Date
    Jul 2014
    Posts
    4

    Re: [RESOLVED] runtime error '6':overflow

    hi
    please help me
    in msflexgrid vb6 :
    dim x
    With MSFlexGrid1
    x = .Row
    For x = 1 To 500
    .TextMatrix(x, 3) = Format(.TextMatrix(x, 2) / .TextMatrix(x, 1), "standard")
    Next x
    End With
    if .TextMatrix(x, 1) = 0 , occurs error runtime 6 overflow
    why vb unable do 0/0 or 1/0 ,no any idea?????????

  27. #27
    New Member
    Join Date
    Jul 2014
    Posts
    4

    Re: [RESOLVED] runtime error '6':overflow

    no any code for sum of numbers in col 1?

  28. #28
    New Member
    Join Date
    Jul 2014
    Posts
    4

    Re: [RESOLVED] runtime error '6':overflow

    no any way for fix particular col in msflexgrid?

  29. #29
    New Member
    Join Date
    Jul 2014
    Posts
    4

    Re: [RESOLVED] runtime error '6':overflow

    no any way for numbers frequency in msflexgrid vb6?

  30. #30
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: [RESOLVED] runtime error '6':overflow

    @madeaz,

    Please Do not bump and hijack topics Start your own thread.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  31. #31
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: [RESOLVED] runtime error '6':overflow

    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width