none
odbc native client api RRS feed

  • Question

  • Hi,

    I have tried to find out replacement of the following api's in odbc native client, but did not find any relavent information.
    dbname
    dbuse
    dbgetmaxprocs
    these are implemented in db-library, I need to find out the replacement of this api's in odbc native client using vc++
    I would really helpful if any one support this request asap.
      
    Thanks,harin
    Thursday, September 10, 2009 7:19 AM

Answers

  • dbname is:

    SQLGetConnectAttr(SQL_ATTR_CURRENT_CATALOG);
    http://msdn.microsoft.com/en-us/library/ms710297(VS.85).aspx

    I think dbuse is:

    SQLSetConnectAttr(SQL_ATTR_CURRENT_CATALOG);
    http://msdn.microsoft.com/en-us/library/ms713605(VS.85).aspx

    There is no dbgetmaxprocs in ODBC.  From the client, there can be an arbitrarily large number of simultaneous connections and statements open at the same time (pseud-arbitrary, limited by pointer size for the architecture).  dbgetmaxprocs and dbsetmaxprocs were apparently used in dblib to arbitrarily limit the number of simultaneous operations a client could perform.  This is neat for things like minimizing license usage, but it doesn't actually work.  If a client is connected to 2 machines, it still can (by default) perform only 25 simultaneous operations.  It doesn't matter if 20 are on one server and 5 on the other or even 25 on one server and 0 on the other, so it has marginal client utility and was not adopted for the development of the ODBC standard.

    Hope that helps,

    John
    This post is provided 'as is' and confers no express or implied warranties or rights.
    Thursday, September 10, 2009 9:54 PM
    Moderator