473,396 Members | 1,864 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,396 software developers and data experts.

Client Access ODBC DB2 driver problem

I'm working with IBM's Client Access ODBC Driver version 8.00.08.00
5/8/2001 installed with Client Access Express V5R1M0.

The issue is if I execute the exact same select statement more than
twice in a row I will no longer get results back. For example using the
following table

CREATE TABLE EJWLIB.BHEADW (
BATCHNUM NUMERIC(5) NOT NULL,
COMPID CHAR(2) NOT NULL,
AMOUNT NUMERIC(9,2) NOT NULL,
BDATE DATE NOT NULL,
EDIREF CHAR(15),
FLAG CHAR(1) NOT NULL )

And I insert the following values (the table is EMPTY except for single
row below)
INSERT INTO EJWLIB.BHEADW VALUES ('1', 'FX', '361.94', '20050422',
'305855545', 'O')

and peform
SELECT * FROM EJWLIB.BHEADW WHERE AMOUNT = '361.94' AND COMPID = 'FX'
I get the correct result the first two times I execute the statement
and then NO results for every additional time I call it UNLESS I close
the connection
and reestablish it.

I've tried using PHP, wxWidgets's wxDB (odbc class) and MS Excel's
query tools all with the same results. Since all 3 apps have the same
results I assume it's an issue with the ODBC driver. I examined a trace
log from the ODBC driver and was unable to find any differences with
the data in the log after the 2nd select statement.

If I change the select statement to
SELECT * FROM EJWLIB.BHEADW
OR
SELECT * FROM EJWLIB.BHEADW WHERE COMPID = 'FX'
it works correctly. However using
SELECT * FROM EJWLIB.BHEAD WHERE AMOUNT = '361.94'
it returns to the same issue stated above where it will work correctly
for two calls and then say there are no
results.

If I perform a
SELECT * FROM EJWLIB.BHEADW WHERE AMOUNT = '361.94' AND COMPID = 'FX'
get my results and perform a
SELECT * FROM EJWLIB.BHEADW
and get the results I can loop the two as many times as I want.

I can't seem to find any freeware alternative DB2 ODBC drivers out
there to play with. Anyone have any ideas?

Thanks

Eric Wescott

Nov 12 '05 #1
3 2676
Wescotte wrote:
I'm working with IBM's Client Access ODBC Driver version 8.00.08.00
5/8/2001 installed with Client Access Express V5R1M0.

The issue is if I execute the exact same select statement more than
twice in a row I will no longer get results back. For example using the
following table

CREATE TABLE EJWLIB.BHEADW (
BATCHNUM NUMERIC(5) NOT NULL,
COMPID CHAR(2) NOT NULL,
AMOUNT NUMERIC(9,2) NOT NULL,
BDATE DATE NOT NULL,
EDIREF CHAR(15),
FLAG CHAR(1) NOT NULL )

And I insert the following values (the table is EMPTY except for single
row below)
INSERT INTO EJWLIB.BHEADW VALUES ('1', 'FX', '361.94', '20050422',
'305855545', 'O')

and peform
SELECT * FROM EJWLIB.BHEADW WHERE AMOUNT = '361.94' AND COMPID = 'FX'
I get the correct result the first two times I execute the statement
and then NO results for every additional time I call it UNLESS I close
the connection
and reestablish it.

I've tried using PHP, wxWidgets's wxDB (odbc class) and MS Excel's
query tools all with the same results. Since all 3 apps have the same
results I assume it's an issue with the ODBC driver. I examined a trace
log from the ODBC driver and was unable to find any differences with
the data in the log after the 2nd select statement.

If I change the select statement to
SELECT * FROM EJWLIB.BHEADW
OR
SELECT * FROM EJWLIB.BHEADW WHERE COMPID = 'FX'
it works correctly. However using
SELECT * FROM EJWLIB.BHEAD WHERE AMOUNT = '361.94'
it returns to the same issue stated above where it will work correctly
for two calls and then say there are no
results.

If I perform a
SELECT * FROM EJWLIB.BHEADW WHERE AMOUNT = '361.94' AND COMPID = 'FX'
get my results and perform a
SELECT * FROM EJWLIB.BHEADW
and get the results I can loop the two as many times as I want.

I can't seem to find any freeware alternative DB2 ODBC drivers out
there to play with. Anyone have any ideas?

Thanks

Eric Wescott


Try changing AMOUNT definition to string - since your predicate is on equality
of string compared to numerical value - which may be rendering undefined results.

Jan M. Nelken
Nov 12 '05 #2
It always returns the correct result on the first and second attempt.
It's the 3rd + try where it doesn't return any results. The SQL
statement is identical every time and looking at the trace log appears
to be identical for every statement even though there are no results
returned. If I perform the statement and then perform any other
statement and then repeat the original it will always display teh
correct result. To me it seems to me more a problem with the driver
itself but I can't find an alternate driver to use.
Try changing AMOUNT definition to string - since your predicate is on equality of string compared to numerical value - which may be rendering undefined results.
Jan M. Nelken


Nov 12 '05 #3
Wescotte wrote:
It always returns the correct result on the first and second attempt.
It's the 3rd + try where it doesn't return any results. The SQL
statement is identical every time and looking at the trace log appears
to be identical for every statement even though there are no results
returned. If I perform the statement and then perform any other
statement and then repeat the original it will always display teh
correct result. To me it seems to me more a problem with the driver
itself but I can't find an alternate driver to use.

Try changing AMOUNT definition to string - since your predicate is on


equality
of string compared to numerical value - which may be rendering


undefined results.
Jan M. Nelken



If you can take trace of that on client and on AS/400 - it would be helpful.
Unfortunately I don't know anything about AS/400 and/or Client Access (I am DB2
UDB person).

BUt you can always try to download DB2 UDB Connect Personal Edition (trail) and
configure your machine to connect to AS/400. With DB2 COnnect you will have Db2
Universal JDBC driver (JCC) which you can use to try your query.

Jan M. Nelken
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Roy Souther | last post by:
Trying to get the unixODBC to work connecting to an IBM DB2 UDB V8.1. The DB2 server is running on Red Hat 8 and is tested and confirmed to be serving connections to Windows 98 clients using the...
3
by: Wescotte | last post by:
I'm having an issue with a php program I am writing. If the user enteres their password incorrectly a popup box appears asking them if they would like to reenter their password (it's part of the...
1
by: JoeBobHankey | last post by:
Background: - I'm running MSDE 2000 (not client tools, stored procedure capability, etc). This may change, but not in the first part of development. - My Access file is an Access 2002 project...
5
by: Mike McIntyre [MVP] | last post by:
I am working on an issue where and ASP.NET web application on one computer (A) needs to access files on a network mapped drive (B). This application uses as DSN on (A) that maps a proprietory...
2
by: Chuck Ritzke | last post by:
Hi all, I am getting an intermittant error after uploading a project from my development machine. I click on a link which opens an aspx page that, upon page load, reads a very small amount of...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
6
by: SEFL | last post by:
Hi there, I'm trying to write a VBS that accesses a local database on my system (personal project). I'm running Windows XP 64-bit with Access XP. Every time I try to access the database on...
21
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.