ODBC Connection

Paul 61 Reputation points
2022-09-02T15:16:23.73+00:00

What is the best way to script to achieve the following on the client Windows 10 computer at a scheduled set time (Windows Task)...
To detect specific ODBC connection, if opens, close it.

batch file or console app?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,195 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
328 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 51,346 Reputation points
    2022-09-02T16:08:27.607+00:00

    Powershell would be my choice. But I'm curious what you mean by a specific ODBC connection as that is per process. So you wouldn't see it from another process unless you were doing this from a database server and querying the database itself. In that case it would depend upon your DB.


  2. S.Sengupta 17,311 Reputation points MVP
    2022-09-03T01:11:35.357+00:00

    You can try ODBC Test Connection Using PowerShell or, using a DQY File.

    https://blog.devart.com/4-ways-to-test-an-odbc-connection.html

    0 comments No comments