Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: CLI - Table name of colname after SQLDescribeCol

From: Koetter, Thomas Theodor <thomas.theodor.koetter(at)sap.com>
Date: Tue Jul 17 2007 - 10:25:57 EDT


Hello Dirk

> -----Original Message-----
> From: Horstmann, Dirk [mailto:Dirk.Horstmann@wincor-nixdorf.com]
> Sent: Dienstag, 17. Juli 2007 12:54
> To: maxdb@lists.mysql.com
> Subject: CLI - Table name of colname after SQLDescribeCol
>
> Hi.
> I have a problem.
> I need after...
>
> select * from table1, table 2
> ...SQLDescribeCol(hstmt, i, colname, sizeof(colname), &colnamelen,
> &coltype, &colSize,&colScale, NULL);
> ...
>
> the table name from the colname.
>
> SQLColAttribute(hstmt,i,SQL_DESC_TABLE_NAME
> ,tabname,sizeof(tabname),&l,NULL);
>
> doesn't work. tabname = ""
>
> How can i get the tablename ??

Unfortunately, this is not possible with kernel releases 7.6 and lower, since this information is not transfered to the clients. The ODBC reference allows this behavior.

Excert from SQLColAttribute (SQL_DESC_TABLE_NAME): The name of the table that contains the column. The returned value is implementation-defined if the column is an expression or if the column is part of a view. If the table name cannot be determined, an empty string is returned.

Sorry for the inconvinience and regards
Thomas



Dr. Thomas Kötter
SAP AG, Berlin
NW EIM MLC IFA MaxDB: all you need!
www.sdn.sap.com/irj/sdn/maxdb www.mysql.com/products/maxdb www.sapdb.org

Sitz der Gesellschaft/Registered Office: Walldorf, Germany Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), Léo Apotheker (stellvertretender Sprecher / Deputy CEO), Werner Brandt, Claus Heinrich, Gerhard Oswald, Peter Zencke Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner Registergericht/Commercial Register Mannheim No HRB 350269

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.

This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.  

-- 
MaxDB Discussion Mailing List
For list archives: 
http://lists.mysql.com/maxdb
To unsubscribe:    
http://lists.mysql.com/maxdb?unsub=lists@pantek.com
Received on Tue Jul 17 10:33:55 2007
Do you need help?X

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:26 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library