How to connect to SQL Server data without using SQL Server Management Studio in C# ?

Dong Lam trien 1 Reputation point
2020-09-18T07:38:15.057+00:00

ask: is it possible to connect SQL Server data according to file connection type, just like in microsoft access data connection
public static string sConnectionString = @ "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" + @ "| DataDirectory | \ data.mdb" + "; Persist Security Info = False; Jet OLEDB: Database Password = 123";

how is the command written ?

Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,909 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dong Lam trien 1 Reputation point
    2020-09-21T06:29:27.127+00:00

    The link you sent above is to install SQL Server Management Studio and add the sql server databa file to then use C# to connect data in this case I know. I want to connect the file directly to the data file without having to install SQL Server Management Studio, did you know this ?

    0 comments No comments

  2. Sunny Qi 10,886 Reputation points Microsoft Vendor
    2020-09-21T06:41:20.927+00:00

    Hi,

    C# is currently not supported in the Q&A forums, the supported products are listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    I would like to suggest you can ask the experts in the dedicated MSDN C# forum over here:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral&filter=alltypes&sort=firstpostdesc

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Best Regards,
    Sunny

    ----------

    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.

    0 comments No comments

  3. Dong Lam trien 1 Reputation point
    2020-09-24T01:54:45.407+00:00

    Thank you for just helping me exchange on other forums