Hello Dirk > -----Original Message----- > From: Horstmann, Dirk [mailto:[EMAIL PROTECTED] > 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/[EMAIL PROTECTED]