CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Posts
    757

    Connecting to SQL Server and KeepAlive

    Hi,
    I'm trying to write a program in MSVC to connect to SQL Server and wondering if it is possible to set KeepAlive parameter on the connection from the code. Or it should be done from the ODBC Driver Manager and it can't be done from the C++.

    Thank you.

  2. #2
    Join Date
    Jul 2024
    Posts
    3

    Re: Connecting to SQL Server and KeepAlive

    Hi,

    Yes, you can set the KeepAlive parameter on a connection to SQL Server from your code in MSVC. You can do this by setting the appropriate connection string attributes or using SQL commands in your C++ code. However, some settings might also need configuring in the ODBC Driver Manager.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured