Recent

Author Topic: SQLGetConnectAttr  (Read 650 times)

Grahame Grieve

  • Full Member
  • ***
  • Posts: 110
SQLGetConnectAttr
« 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?

Grahame Grieve

  • Full Member
  • ***
  • Posts: 110
Re: SQLGetConnectAttr
« Reply #1 on: October 09, 2020, 12:14:14 pm »
.. and SQLGetFunctions

Grahame Grieve

  • Full Member
  • ***
  • Posts: 110
Re: SQLGetConnectAttr
« Reply #2 on: October 09, 2020, 12:33:44 pm »
And SQLSetDescField is commented out?

LacaK

  • Hero Member
  • *****
  • Posts: 605
Re: SQLGetConnectAttr
« Reply #3 on: October 13, 2020, 07:43:26 am »
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.
« Last Edit: October 13, 2020, 08:36:14 am by LacaK »

Grahame Grieve

  • Full Member
  • ***
  • Posts: 110
Re: SQLGetConnectAttr
« Reply #4 on: October 18, 2020, 12:54:10 am »
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.

LacaK

  • Hero Member
  • *****
  • Posts: 605
Re: SQLGetConnectAttr
« Reply #5 on: October 19, 2020, 01:36:44 pm »
Some of constants and functions you mentioned were added to TRUNK.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8901
  • FPC developer.
Re: SQLGetConnectAttr
« Reply #6 on: October 19, 2020, 02:17:35 pm »
Some of constants and functions you mentioned were added to TRUNK.

(and were merged back to fixes last week)

LacaK

  • Hero Member
  • *****
  • Posts: 605
Re: SQLGetConnectAttr
« Reply #7 on: October 19, 2020, 06:18:29 pm »
Marco: but patch to ODBC headers is not merged yet. It was applied only today  :)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8901
  • FPC developer.
Re: SQLGetConnectAttr
« Reply #8 on: October 19, 2020, 07:12:59 pm »
Ok, yes, I merged older ODBC patches (and not the parser ones)

 

TinyPortal © 2005-2018