Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

im getting 0 (zero) values when i take data in VB 6.0

nachiket2k2nachiket2k2 Member Posts: 70
i am connecting Visual Basic 6.0 with ADO connection with Oracle 8.0 Personal Edition.

in VB 6.0, in the text fields in which i am calling all the respected column values in respected textboxes, i am getting all integer values as 0 (zero).

i tryed all the things.
charaters are shown fine. but the integer values are 0. on another comptuter at my office also has same problem.

any solution?

i am useing p-3 windows98 with 128MB ram.
=======================

Comments

  • delljohnbdelljohnb Member Posts: 81
    : i am connecting Visual Basic 6.0 with ADO connection with Oracle 8.0 Personal Edition.
    :
    : in VB 6.0, in the text fields in which i am calling all the respected column values in respected textboxes, i am getting all integer values as 0 (zero).
    :
    : i tryed all the things.
    : charaters are shown fine. but the integer values are 0. on another comptuter at my office also has same problem.
    :
    : any solution?
    :
    : i am useing p-3 windows98 with 128MB ram.
    : =======================
    :


    Here is a POSSIBILITY...

    I have seen something like this before....you might want to give this a try.

    There is a CHANCE that the text variable has quotes on either end. Strip off the first character and the last character of the variable, then try using the val function. This MIGHT work....

    A suggestion : pull the text value from the database and assign it to a temporary dummy text variable, THEN delete the quotes. then have another line where you assign the integer variable the val of the dummy text variable. Don't do it all on one line of code...

    Example :

    dummytext=objWhateverplugin.value ' gets the value from your database
    dummytext=trim(dummytext) ' removes any filler spaces
    dummytext=left(dummytext,len(dummytext)-1) ' removes the right quote
    dummytext=right(dummytext,len(dummytext)-1) ' removes the left quote
    integervariable=val(dummytext)


    Note...the first line is obviously not valid code. Simply replace that line with whatever code you would use to pull the text from the database.

    Good Luck,
    Delljohnb

Sign In or Register to comment.