Something like this? https://learn.microsoft.com/en-us/azure/azure-sql/database/connect-query-dotnet-visual-studio#create-code-to-query-the-database-in-azure-sql-database
How to connect to SQL Server data without using SQL Server Management Studio in C# ?
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 ?
4 answers
Sort by: Most helpful
-
Julian Hüppauff 336 Reputation points Microsoft Employee
2020-09-18T12:47:23.583+00:00 -
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 ?
-
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=firstpostdescThe 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. -
Dong Lam trien 1 Reputation point
2020-09-24T01:54:45.407+00:00 Thank you for just helping me exchange on other forums