If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Vb_odbc_informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-19-02, 07:01
Maurizio Maurizio is offline
Registered User
 
Join Date: Aug 2002
Location: italy
Posts: 5
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
Reply With Quote
  #2 (permalink)  
Old 08-19-02, 07:20
Roelwe Roelwe is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 08-19-02, 07:21
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
I'm sorry, thats SQLIDEBUG, not SQLDEBUG.
__________________
rws
Reply With Quote
  #4 (permalink)  
Old 08-19-02, 11:27
Maurizio Maurizio is offline
Registered User
 
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?
Reply With Quote
  #5 (permalink)  
Old 08-19-02, 20:00
rnealejr rnealejr is offline
Registered User
 
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 ?
Reply With Quote
  #6 (permalink)  
Old 08-20-02, 06:16
Maurizio Maurizio is offline
Registered User
 
Join Date: Aug 2002
Location: italy
Posts: 5
Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On