I developed an application in C# and SQL and now I want to run it on another client machine without creating an installer.
I want to use the EXE from the Bin folder which is autogenerated when we run application in VS 2012. But it's not getting the SQL connection to the database on the other system.
it should work as is, make sure that you have access to the database from the second machine (network and permissions).
Related
I have a desktop application made in vs 10 with sql server 8. I have added the mdf file in app_code folder of project and the app.config is changed accordingly.The application is published and is availabel as setup file(.exe).If i want to install it in another pc, do i need to install the sql server in that pc?
The short answer is Yes
The idea is database needs a server to host it and an engine to run it
mdf file has no value without sql serve and access files has nothing to do if you don't have MS Access installed, etc.
But this does not mean db server must be installed on the client machine that has the application. as it can be on another machine or on the cloud (i.e. hosted on the internet)
As long as your application is connecting to that machine/server
I have created a windows C# form application in VS 2012 which makes use of oracle 10g database.I created a setup file of it, and installed it on my PC,it works correctly.But when installed on another PC with no oracle installed ,It did not work, i mean no data from database was displayed.My question is how to include oracle database tables in the setup file of the application, so that it can be installed on PC with no oracle installed?
Well, 2 possibilities here:
either you have your Oracle database installed on your PC ("locally"), and so when running your form application from the same machine it's easy to target it
or your DB runs on another machine/server, but you have setup your PC to target it. When you have an Oracle client installed on your machine, the tnsnames.ora which is normally in the network/admin subdir of your Oracle client installation directory should contain an item that points to this DB instance. If so, you just have to install an Oracle client on the machine where you want to deploy your app, and setup the tnsnames.ora the same way.
This is the standard way to distribute an application, anyway: make an application/a DB run in a central place accessible by all in order to target it easily. If you have the DB running locally on your PC, you may think about changing your architecture.
I have built a Windows Forms application using Visual Studio 2012 and MSSQL 2008. I need to deploy this project using InstallShield Limited Edition.
While running this application on my pc, it does nto work well when I use the following connection string or .//SQLEXPRESS.
I need the installer to find the exe file of the application on other uer's pc with the database file. Where do I need to put my database files in the deployment files folder? What should my connection string be?
i use .//SQLEXPRESS it doesnt work as well
DO NOT use .//SQLEXPRESS as datasource name in the connection string.
Recommended way is to menthion Instance Name if your application is to be deployed in different environments(especially OS). I ran into trouble when I had the Datasource as .dot which worked in Win 7 not in WinXP. Either one of the following approach works fine.
(local)\SqlInstanceName
(ComputerName)\SqlInstanceName Ex: CD-SJHONES\SQLINSTNACE
In certain cases i had to include the computer name, So during the application deployment i get the computer name and update the connection string accordingly.
where i need to put my database files in deployment files and folder
and what should be my connection string
Connection string
I have already answered connection string releated question above.
Database files
What do you mean by database file. how database is created in the client machine ? do you create a database during application deployment or users manually create it with script ? There is nothing to worry about the database fine as long as your application have right connection string to point to your database.
Application files and folders
Again this doesn't really matter where application files and folders resides in the client machine. It's upto the users to decide where he/she likes to install the application.
You cannot install from backup. Also in your scenario, you should force end user t install Sql Express, what If it has already installed. So You need considering , scripting of entire database. You can create another exe / look for option in Installshield to execute that Script incase the database server is found else, force user to download the Sql Sever Express or Embedd it into setup and execute the script over there. But that will make your Setup Size more than 100's of MB.
I have created windows application using windows c#.net and ms sql server 2008. And i am going to build setup file including database. Is that possible to build a setup including DB with out installing MS SQL Server 2008 in my client system?. If possible, this helps no need to install SQL server in my client system or else give a possible feedback. Thanks in advance.
You won't be able to load and use the database without a server running somewhere. Now, you could install that database on a remote server that is provided during installation - but a server has to be running somewhere.
Even loading it via file requires SQL Express to be running.
You can convert database to file (by detaching database) and then add that file to your project.
Let's suppose I made an application in .net using sql server as database.
So if I want to deploy my application to some another PC i have to instal sql server
but I want that i should not install the sql server and my database should be automatically installed
i just want to make sure that is the concept of Local Database can fulfill my requirement
if so then how is it possible for me
thanks
You can use App_Data folder in the visual studio to store your .mdf files.Once you transfer your solution to a different system , the db file will be transferred automatically.
http://msdn.microsoft.com/en-us/library/ex526337.aspx
You should run your SQL server on a separate computer (server) to avoid having to install SQL server on all client computers. This way all PCs running your application can share a single instance of SQL Server.
If you want a single user DB per application instance I would recommend using SQL Compact edition instead
You can use SQL2012 Express Edition LocalDB. This uses a self contained file for your database, and can be installed as a prerequisite. When your application installs, you can install a blank database file, and connect to it.
SQL Server is not a small application that will be installed automatically and will require setup and configuration. You can however use it remotely. Or consider using an embedded database. But if you want to use a local database, you can use your mdf file of the database as a local database.