No announcement yet.

SQL Tools

  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Tools

    Hi (or should I say Hi Eric),

    when I make an ODBC source I have to define a database. Is it possible to get a list of all database on a db-server using SQL Tools? I understand that if this is not possible it is because that's the way ODBC is defined.

    Best Regards
    Kari Laine

  • #2
    You can get a list of all ODBC data sources on a system; under "pure" Windows this is done using the SqlDataSources() function. I'm sure SQLTools has some kind of equivalent.

    However, what constitutes a database is subject to interpretation. Eg, you can have a an ODBC data source that is generic and you must select the physical "database" at runtime.. eg, most Windows systems come with a predefined ODBC datasource for "Microsoft Excel Files" and you have to pick the speadsheet file (*.xls or the new one, I forget that one's extension.).

    So.. depends what you mean by "database".
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]


    • #3
      Kari --

      Check out the SQL_DataSource* functions: SQL_DataSourceCount, SQL_DataSourceInfoStr, and so on.

      -- Eric Pearson, Perfect Sync, Inc.
      "Not my circus, not my monkeys."