Re-installation without loosing work (for new database)?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 anni tempo fa
I have pretty much finished developing my nopcommerce website, but I have realised that when I installed it I selected a built in database to run off rather than using a separate database that I can access in SQL Server Management, which I now need to be able to do.

I've tried creating a blank database and updating the connection string in Setting.txt to connect to it and that works-ish (it creates all right tables and fields in the database when it builds for the first time) but comes up with the error "No store could be loaded". I've look for hours on how to fix this and I don’t really understand what to do.

I was wondering if I reinstalled nopcommerce in this solution, and select the “Use an existing SQL Server database” option, would it solve my problem? And, more importantly, would my work stay intact? I have done a lot of source code editing and would really rather not have that overwritten.

Or is there an easier way? I'm quite new to nopcommerce and I don't know all the in's and out's of it, so any help would be greatly appreciated.

Thanks.

p.s. please tell me if I’m not making any sense as well. (:
9 anni tempo fa
Have you made any changes to the database design or just to the source code?  Re-installing the application will not change the source code edits that you made.  Installing it only creates all of the database tables you need, etc.  However, just to make sure, you can copy your source code so that you have a backup.  

When you tried to re-install it to a blank database you manually put the settings into the settings.txt file?  That might be the problem.

Here is what I would do.  Copy your source code from the version you have working with the internal database.  In this copy, completely delete everything in the settings.txt file.  Then, go through the installation process using a new blank database.  All of your edits to the source code will remain... the only stuff that will be gone is anything you added that relies on the database such as entered products, categories, etc.
9 anni tempo fa
Hi,

Yes, I tried to re-install the blank database by changing the settings in the settings.txt and no, I don't think I've made any changes to the original database, other then adding products etc.

I'm a bit confused also about what is meant by "source code". Previously I thought that it described things like the Main.cs and the cshtml files that customize the front end of the website (that's what I've been working on mainly), but I get the feeling its more then that. What else is implied by "source code"?

Also, is there anywhere with a step-by-set documentation on installing nopcommerce in this circumstance?

Thank you. Very grateful for your help
9 anni tempo fa
Installing nopCommerce: http://docs.nopcommerce.com/display/nc/Installing+nopCommerce

Difference between source code and web version: http://www.strivingprogrammers.com/Blog/post/Lavish-Kumar/25/Difference-between-No-Source-Web-OR-Source-Code-of-nopCommerce/
9 anni tempo fa
I worked out what I needed to do, and it seems to be working fine now.

- Create a new solution
- Install NopCommerce on that solution
      - Make sure that its database settings are set to what you now desire.
      - When this is installed you will have a database that has been generated automatically by NopCommerce at it's default state, but now with your desired settings.
- All you need to do now is swap the connectionstring in the settings.txt file on you actual project with the connectionstring of this newly created database.

NOTE: The new database will not have any of your products on it, it is completely empty. To avoid losing your products, export the them to an excel, or xml, file before you change the connectionstring and simply import the file back into NopCommerce after you've made the change and it should be good.

The reason for the "No store could be loaded" error is because there needs to be at least one record in the dbo.Store table in your database. If you just change the connectionstring to an completely empty database, nopcommerce will populate it with the appropriate tables but it will not add a record that represents you store, thus causing the error. If you follow the instructions above you will have a new, empty and functioning database that has your new settings and your website can use.

Hope this helps! (-:
6 anni tempo fa
Even I was facing same problem "Store Not Found".  For resolving this issue , I followed below mentioned steps:-

Firstly Delete the setting.txt file from Nop.Web->App_DATA.
Secondly Update Web.config "UseFastInstallationService" with True value.
After that I restart my nopCommerce application, and able to install the sample data.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.