473,396 Members | 1,846 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.

SQLStatistics driver bug?

Hi,

I am trying to find the number of rows in a DB2 table using ODBC
SQLStatistics. Although, the documentation claims that this is
supported, I am getting SQL_ERROR when the data is fetched (simplified
code shown below). When I run it against SQLServer, Access, Excel it
runs fine but not against DB2 and red Brick. Can anyone tell me if
this is a driver bug or am I missing something?

// Allocate a statement handle.
retcode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc1, &hstmt1);

// get stats
retcode = SQLStatistics(hstmt1, NULL, 0, NULL, 0, "xyz", SQL_NTS,
SQL_INDEX_UNIQUE, SQL_QUICK /* SQL_ENSURE */); // tried both ENSURE
and QUICK

// Bind columns
SQLBindCol(hstmt1, 7, SQL_C_SSHORT, &DataType, 0, &cbDataType);
SQLBindCol(hstmt1, 11, SQL_C_SLONG, &Cardinality, 0,&cbCardinality);

// fetch results in a loop
retcode = SQLFetch(hstmt1);

FOR DB2: [IBM][CLI Driver] CLI0110E Invalid output or indicator
buffer specified. SQLSTATE=22002

FOR RedBrick: [Red Brick][ODBC Driver]** ERROR ** (10002) NULL value
in column 11, but no indicator.

TIA,
Niles
Nov 12 '05 #1
0 1414

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

Similar topics

6
by: Philip | last post by:
Hi, i'am looking for a db2 driver for windows the DB2 servers runs on as400 if that makes any difference. Thanks, Philip
0
by: CS Loh | last post by:
Hi, I install a filter driver through INF file to a 3rd party audio device (with driver). The filter driver works well on the 3rd party driver. However upon uninstallation of the filter driver,...
0
by: Bing | last post by:
Hi, I am configuring the same DB2 v8.1 JDBC universal driver (db2jcc.jar and db2jcc_license_cisuz.jar) from DB2 SP5 fix pack under WSAD 5.1.x environment and WebSphere application Server 5.0.2...
3
by: Rakesh | last post by:
Hi, I want to get connection to a DB2 database using the driver COM.ibm.db2.jdbc.DB2XADataSource. I have also included 'db2java.zip' in the classpath. However I am getting the exception ...
12
by: Steve | last post by:
I wrote a simple virtual device driver int15.sys, Is C# support load the device driver from AP?
3
by: bb | last post by:
I have a windows network device driver written in c++ and a user interface im porting to c#, my problem is i dont seem to be getting notified of the event calls from the driver to the c# app im...
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...
1
by: dschat | last post by:
Hi all, I am receiving: 'SQL0443N The Routine "SQLSTATISTICS" returned an error' when I try to connect to a DB2/OS390 table over MS Access. I bound the database with db2cli.lst, ddcsmvs.lst and...
0
by: deangc | last post by:
We have a number of client installations where dynamic sql snapshots show that: CALL SYSIBM.SQLSTATISTICS(?,?,?,?,?,?) is the top consumer of CPU, usually by a wide margin. We regularly do...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.