Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run C# app which contains local SQL Server database on another computer?

I have created a C# program with a SQL Server database. It works fine on my computer but on my friend's PC it doesn't (my friend doesn't have SQL Sever 2008). Is it possible to make it without any installation? And if it can, how can it be done?

This is my connection string:

connectionString="Data Source=\v11.0;AttachDbFilename=|DataDirectory|\MainDatabase.mdf;Integrated Security=True"
like image 930
Petar Bechev Avatar asked Jan 29 '16 08:01

Petar Bechev


People also ask

What can I use to run C code?

To compile and run a C language program, you need a C compiler. A compiler is a software that is used to compile and execute programs.

Can you run C anywhere?

Yes, the standard libraries are everywhere. Just think about it, most of your programs that you get are writen in C/C++. Only dependencies come when you use some specified libraries like winsock etc, therefore some windows applications are unlikely to work on linux and vice versa.

Can I run C on notepad?

Write and save the programTo write the source code of your first C program you need to open the Notepad++ text editor. The quickest way to do that in Windows 10 is to hit your Win key, type Notepad++ in the search window, and hit Enter. and paste it into the editor. Yes, this is your first C program!

How can I run C on my phone?

To Install and Use C/C++ compiler in Termux (in Termux clang is the C/C++ compiler) , Download & Install Termux from : Play Store. After Installing execute this command pkg install clang. After Successfully installing clang you can compile C/C++ scripts.


1 Answers

If you want to run your program without the SQL server installed you have to use a service based sql database.see this image

you can add a local database through Visual Studio (project--> Add new item)

like image 133
Nuwan Karunarathna Avatar answered Sep 29 '22 06:09

Nuwan Karunarathna