question

DongLamtrien-1421 avatar image
0 Votes"
DongLamtrien-1421 asked ·

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 ?

windows-10-setup
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jhueppauff avatar image
0 Votes"
jhueppauff answered ·
· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DongLamtrien-1421 avatar image
0 Votes"
DongLamtrien-1421 answered ·

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 ?

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SunnyQi-MSFT avatar image
0 Votes"
SunnyQi-MSFT answered ·

Hi,

C# is currently not supported in the Q&A forums, the supported products are listed over here https://docs.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.


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DongLamtrien-1421 avatar image
0 Votes"
DongLamtrien-1421 answered ·

Thank you for just helping me exchange on other forums

· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Thanks for your reply and hope my answer will help you.

Experts in C# forum will provide more efficient solution for you since we're not familiar with C#.

If the above reply is helpful, please help to click Accept answer since this is very important to my work.

Thanks in advance!

Best Regards,
Sunny

0 Votes 0 · ·