Lazarus
Programming => Databases => Topic started by: Grahame Grieve on October 09, 2020, 11:42:26 am
-
Why is SQLGetConnectAttr not declared in odbcdyn.inc? (packages/odbc)
SQLSetConnectAttr is defined, so it would seem that SQLGetConnectAttr should be. Is there a reason, or is this an oversight?
-
.. and SQLGetFunctions
-
And SQLSetDescField is commented out?
-
IMO:
- SQLGetConnectAttr and SQLGetFunctions are not added because nobody requested/needed it up to now
- SQLSetDescField can be uncommented (it was added by my patch as a new function, but I did not used it so probably I commented it)
You can post request on bug tracker https://bugs.freepascal.org.
If you do not have account I can create request ...
Attached is patch, which adds 3 requested functions.
-
Thanks - wonderful. I also use these additional api calls:
SQLDescribeParam
SQLForeignKeys
SQLParamData
SQLGetStmtOption
SQLGetTypeInfo
And these constants:
SQL_API_ALL_FUNCTIONS = 0;
SQL_API_ODBC3_ALL_FUNCTIONS = 999;
SQL_IGNORE = (-6);
SQL_ATTR_QUERY_TIMEOUT = SQL_QUERY_TIMEOUT;
SQL_LEN_DATA_AT_EXEC_OFFSET = (-100);
SQL_DIAG_CURSOR_ROW_COUNT = (-1249);
SQL_NEED_LONG_DATA_LEN = 111;
SQL_NAMED = 0;
SQL_UNNAMED = 1;
SQL_ATTR_PARAMSET_SIZE = 22;
SQL_API_SQLPARAMDATA = 48;
SQL_PC_UNKNOWN = 0;
SQL_PC_NON_PSEUDO = 1;
SQL_PC_PSEUDO = 2;
SQL_ALL_TABLE_TYPES = '%';
though I'm really not sure that the use my codes make of SQL_LEN_DATA_AT_EXEC_OFFSET make any sense (it works, though, so I'm not breaking it)
I've attached the code I'm presently using, though I haven't tested it enough yet.
-
Some of constants and functions you mentioned were added to TRUNK.
-
Some of constants and functions you mentioned were added to TRUNK.
(and were merged back to fixes last week)
-
Marco: but patch to ODBC headers is not merged yet. It was applied only today :)
-
Ok, yes, I merged older ODBC patches (and not the parser ones)