Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsHello,
We have an application which we are in the process of porting from Windows to Linux. The ultimate target is an IBM S390X 64-bit zLinux machine. We are using unixODBC 2.2.13 and DB2 v9.1. We have successfully ported the code to another 64-bit machine (i386 architecture) run Gentoo Linux and it works. However, on the zLinux machine I have the following problem, and it is very strange. If I ever repeat the same query, it fails. For example, if I have a query of the form SELECT * FROM SomeTable, it will work the very first time. If that same query is every performed again it fails. The failure seems to be related to the SQLFetch that retrieves the result set. I am using the SQLBindCol API to bind my data structure to the expected result set. The query is execute by SQLExecDirect. The second time the query is run, I appear to get garbarge. More specifically, some of the expected field data is in the structure if you look at it as a chunk of memory, but it is offeset in the wrong locations, and in some cases missing. I have run both ODBC and CLI traces and everything appears normal at that point. The failure appears to be in the SQLFetch call itself.
Again, the failure only occurs on this particular platform. We have used this code on other platforms successfully. I should add we are working in C/C++.
Has anyone ever encountered a problem such as this? I don't have a code snippet because the SQL calls are encapsulated in our own library calls.
Thanks much.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: KdoPosted on 2008-05-19 at 12:14:00ID: 21600650
Comments are available to members only. Sign up or Log in to view these comments.