Subject: ODBC C API question(s) 2007-03-20 - By Patrick Galbraith
Back Hi all,
I have been using the MySQL client API for quite some time now and am in the middle of utilising ODBC C API for a current project. I'm wondering if there is an equivalent call in ODBC for 'mysql_fetch_lengths' ?
Also, I am wondering what the difference is between
SQLDriverConnect(dbc, (void *)1, "DSN=myodbc3patg", SQL_NTS, outstr, sizeof(outstr), &outstrlen, SQL_DRIVER_COMPLETE);
This fails, and I don't know why.
But this works:
SQLConnect(V_OD_hdbc, (SQLCHAR*) "myodbc3patg", SQL_NTS, (SQLCHAR*) "", SQL_NTS, (SQLCHAR*) "", SQL_NTS);
What is the difference between the two? Is there any benefit/detriment to either? The first snippet is from Easysoft's site, the second from the tutorial on UNIX odbc.
I often see that people use a UID/Password with ODBC DSN. Why use a password and also a DSN? I thought the DSN provides that? If one uses a DSN with UID/Pass, does the UID/Password for the DSN get over-written?
Also, where are some good sites for the ODBC C API, with examples, descriptions of the API calls? I have found info at Easysoft's website as well as UnixODBC website. It seems that so much ODBC programming is targeted for GUIs. Mine is all system-level that I want to accomplish.
Kind regards, thanks in advance!
Patrick
-- Patrick Galbraith, Senior Programmer Grazr - Easy feed grazing and sharing http://www.grazr.com
Satyam Eva Jayate - Truth Alone Triumphs Mundaka Upanishad
-- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=mysql@(protected)
|
|