7 messages in com.mysql.lists.bugsRe: ODBC's SQLColumns with column nam...| From | Sent On | Attachments |
|---|---|---|
| Sergey Tulyakov | 17 Feb 2003 12:22 | |
| Venu | 18 Feb 2003 12:54 | |
| Sergey Tulyakov | 18 Feb 2003 20:51 | |
| Venu | 19 Feb 2003 10:37 | |
| Sergey Tulyakov | 19 Feb 2003 11:56 | |
| Venu | 20 Feb 2003 21:40 | |
| Sergey Tulyakov | 21 Feb 2003 11:22 |
| Subject: | Re: ODBC's SQLColumns with column name specified![]() |
|---|---|
| From: | Venu (ve...@mysql.com) |
| Date: | 02/18/2003 12:54:00 PM |
| List: | com.mysql.lists.bugs |
On Mon, 2003-02-17 at 12:22, Sergey Tulyakov wrote:
Hello everybody!
Hi !!
I have a problem with ODBC call to SQLColumns(). The problem is that result set does not contain any data.
How-To-Repeat: Create table 'test_table' with column 'test_column' in the database 'test', and user 'test' with password 'test'. Setup DSN 'test_mysql'.
ok..
Execute following function(first SQLFetch will return SQL_NO_DATA):
The reason is, you are passing wrong input values to SQLColumns.
ret=SQLColumns(hstmt, NULL, 0, (SQLCHAR*)_T("test"), SQL_NTS, (SQLCHAR*)"test_table", SQL_NTS, (SQLCHAR*)"test_column", SQL_NTS);
Why are you supplying _T("test") as the schema name ? If you want to pass catalog name as "test", then pass that with the argument 2 instead of argument 3 i.e. it should be:
SQLColumns(hstmt, "test", SQL_NTS, /* catalog name */ SQL_NULL_HANDLE, 0, /* schema name */ "test_table", SQL_NTS, /* table name */ "test_column", SQL_NTS); /* column name */
Thanks
-- Regards, Venu For technical support contracts, go to https://order.mysql.com __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Venu <ve...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ Palo Alto, CA-94306, USA <___/ www.mysql.com
Join MySQL Users Conference and Expo: http://www.mysql.com/events/uc2003/




