I made a Backup and restore project on visual studio , along with another project. They both use the default database of visual studio. They both have to bundled together along with the database, so it runs without Visual studio. I have tried to use the default VS installer, but i don't think that allows me to use the database aswell.
I have decided to use NSIS to make the installer. What all files, libraries etc. do i need to make the database and project function together, independently(without visual studio). How can i do this ?
Thanks
What kind of database do you mean? MS SQL or MySQL or another?
E.g. to create MySQL database from NSIS you can simply run command line utility and pass your sql script as parameter so the utility will create everything what is in the sql file.
Other database types simply need to extract their database file somewhere to disk and set appropriate paths.
Your question is very vague, there is more details needed to answer you.
Related
I have a visual studio project and I want to use it on another computer. I found that there is a way to upload the project but I wanted to know if its possible to share also my database so it will be linked to the project anytime I change the computer Im working with, and the database will update itself on both computers.
?
create a database project along with your c# project and put all your tables, stored procs, etc. in it. check in the database project in your version control. when moving to a new computer "publish" the database project the first time, or do a "sql compare" any consecutive time to apply the db changes.
https://msdn.microsoft.com/en-us/library/hh272677(v=vs.103).aspx
https://msdn.microsoft.com/en-us/library/hh272690(v=vs.103).aspx
Good evening!
Here is the thing, i've been trying to create a setup project for my app which includes some winforms and a SQL Compact Data Base.
I already added to my VS 2012 the required installation to create install shield installers for my apps, i add it to my project and i follow the instructions.
Once im asked to add the required files to their destination computer paths i add on the install directory the interface final results and to a C:\ folder, the data base final results. I of course changed the database connection to that new folder.
I proceed to generate the installation and then use it on my own computer, everything goes smooth, and once it finishes, i launch the app, it works okay, but upon opening a form which has a datagridview inside of it (or i click a button that has a connection with the database) i get an error messagge telling me that the db files could not be found.
I go to the database folder and it is there, but it doesnt work, the thing is, if i go to my VS 2012 projects folder, open the DataBase project folder and i copy the database inside of it (.sdf file) and i paste it in the new folder for the program, the app works just fine.
Any suggestions? what am i doing wrong?
Hi I'm trying to create a new project in C# where I can include the oracle instantclient_12_1
I start by simple creating a project in C# (windows form project) but when I want to include the path to the dll's I'm trying to do it as indicated.
The general steps to install Instant Client are:
Download the appropriate Instant Client packages for your platform. All installations require the Basic or Basic Lite package.
Unzip the packages into a single directory such as "instantclient_12_1".
Set your environment's library loading path (for example LD_LIBRARY_PATH on Linux, or PATH on Windows) to the directory created in Step 2.
Start your application.
But I'm stuck at point 3: the windows should look like the following:
I'm just making a right click on my project and then go to properties in the solution explorer.But I just get the following window:
(I'm just making a right click on my project and then go to properties in the solution explorer.)
What am I doing wrong? (And gosh, yeah I know I hate visual studio but this is an obligation by owr teacher. Linux is this much simpler...)
Thanks for any help, the initial idea is to make an project where I can work with oracle but it tells me I got the wrong version. (Another annoying thing from Windows..)
Is there a way to store just .sql versions of your stored procedures in a project, then deploy them automatically to a SQL server? Every article I find talks about using a SQL CLR project, writing them in C#, then deploying them, which I can't do because my DBA won't enable CLR.
I am just looking for a way to add them to my solution so that they can be managed in svn, but not have to manually deploy them. Is that possible?
Visual Studio Premium Edition and upper allows you to create Database Project, store it under Source Control, Refactor and many other goodies..
Here is a great training on the subject by PluralSight:
http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs-db
And here is a blog post about it:
http://www.visualstudiotutor.com/2010/08/manage-database-projects-with-visual-studio-2010/
I'm currently building a project that references SQL Server 2005 Assemblies, but I would like to have the option of building it using the 2005 or 2008 assemblies.
Currently I can open each project and change the references, but I'm looking for a better way to do this.
Is there an easy way to do this that I'm missing?
If not Would it be possible to modify these with a script so I could set everything up using a script pre-build?
I don't know if it's the best available solution, but you can implement a custom MSBuild task which reads csproj or vbproject (or any other) file and modify it depending on some MSBuild property set by the target caller.
Visual Studio projects are valid XML files, so you can use XmlDocument or XDocument.
Your custom task would look like:
<changeMSSQLVersion Version="2008" Files="#(ProjectFile)" />