Any example linux code in c/c++(or .net core cs) to connect to linux sql server?

mwx 41 Reputation points
2020-11-17T20:21:22.237+00:00

I was looking for simple example code to connect on linux to a sql server on linux.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,772 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,719 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AmeliaGu-MSFT 13,976 Reputation points Microsoft Vendor
    2020-11-18T06:17:36.96+00:00

    Hi @mwx ,
    Please refer to this tutorial and this article which could help.
    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.