Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2002
    Location
    italy
    Posts
    5

    Unanswered: Vb_odbc_informix

    I use VB6 to manipulate my Informix databases on a RISC6000 server.
    I've got a problem with numeric fields when i pass a value from informix
    to a VB recordset using ADO.

    this is the open statement in my VB project:


    rs_inf.Open "SELECT clifor.rag_soc, clifor.cod_cat, movmag.cod_cli_for, anapro.cat_mer[1,1] ,_
    Sum(movmag.val_unit_net) AS somma From .....


    if i execute the SQL command directly in the DBaccess utility on RISC6000,
    i obtain the right values.
    These are the differences between SQL INFORMIX and VB recordset


    informix 95.15800000
    VB 9


    informix 314.2480000
    VB 31
    --------------------------------------------------------

    if i change the SQL string :

    rs_inf.Open "SELECT clifor.rag_soc, clifor.cod_cat, movmag.cod_cli_for, anapro.cat_mer[1,1] ,_
    Sum(movmag.val_unit_net * movmag.qta_mov) AS somma From .....

    i obtain these results :

    informix 3515.24400000
    VB empty

    and if i try to manupulate the field in my recordset, Vb show this error:

    Run-time Error '-2147217887 (80040e21)'


    Can anyone help me?
    thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    Hi,

    What version of CSDK are you using? I think only version 2.80 (latest) supports ADO correctly.

    If you check this, you could always run a trace from the CLIENT-SERVER communication.

    Set (on the client side) SQLDEBUG=2:<path-to-debugfile>
    f.ex. 2:c:\informix\log

    Then, run the sql-statement.
    Use the sqliprint utility to convert the binary tracefile to an asccii tracefile. Look for error messages and/or CASTS and/or Truncations.
    rws

  3. #3
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    I'm sorry, thats SQLIDEBUG, not SQLDEBUG.
    rws

  4. #4
    Join Date
    Aug 2002
    Location
    italy
    Posts
    5
    hi,

    before all thanks for your answer..

    I have INFORMIX Client - SDK 2.5 (setnet32.exe)

    in ODBC of control panel i read : INFORMIX 3.32 32 BIT.

    Have i the correct version?

  5. #5
    Join Date
    Feb 2002
    Posts
    2,232
    What fields are you trying to modify ? What are your questions - why you receive the error and/or why the results are different ? Is it the sum portion that yields different results ? If you do a straight select without the sum - are the values correct ?

  6. #6
    Join Date
    Aug 2002
    Location
    italy
    Posts
    5
    Originally posted by rnealejr
    What fields are you trying to modify ? What are your questions - why you receive the error and/or why the results are different ? Is it the sum portion that yields different results ? If you do a straight select without the sum - are the values correct ?
    My question was "why the results are different"...
    the wrong value appears only whit the sum portion and if i
    select without the sum, i receive the correct value.

    i have downloaded the last version of CDSK and the problem seems
    to be resolved.
    Thanks to you ...
    bye

Posting Permissions

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