Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><b>Problem 1:</b> Adding SQL database to application - One should do it using the visual studio solution.<br/> Click on the project that uses the database (or better, create a folder first for that), Ctrl+Shift+A>Data>Local Database / Service-Based Database.<br/> then you should populate the database, change the connection strings, etc.<br/> The project will provide you a connection string that can be tempered and be changed in the installation, as the file path can vary.<br/> This way, it'll copy the database among the project installation using your clickonce.<br/></p> <p>Note: Choosing a database type (SDF vs. MDF) is not such a hard question. <br/> If you can use MDF as it has better performence, better capabilities, but requires local installation of SQLExpress.<br/></p> <p><strong>Problem 2:</strong> SSMS (Menegment Studio) is not required or something like that. <br/> Now, I tend to believe that you are installing the database on the server that run the application - you SHOULDN'T do that. use a dedicated server for the database.<br/> However, for your answer, you can do two things to make it better:<br/> 1. You can create a SQL Database named model - which is ideal for database creational as it copies itself to newly databases, and make things easier.<br/> Then, your application can run (in the installation part) SQLConnection.CreateDatabase, which will copy the model and create database for your needs.<br/> 2. Yoy can migrate to a newer solution like using EntityFramework, which there you develop your classes and the EF is responsable for the storage.<p> I havn't used Clickonce for a while, but I know you can make a customized version of it with your texts, your logo... If you want to automate, one of the steps is running your code, if you provide it. you can create installation files. Simply create (Ctrl-Shift-A) Installation file (its there), where you can override methods and run what you want (File copying, adjustments, requirement checks..)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload