Connecting the new instance of nopcommerce2.0 to existing database

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi , I have got a test version of my website , now i need to create a new website pointing to the test database which was already there , I cant find the connection string on my test website so that I can copy that connection string and paste on the new website inorder to use the old database. I am using nopcommerce 2.0 which uses razor. Can anyone please point me where the connection string is and what changes i have to make inorder to connect to the old database.
12 years ago
In nopCommerce 2.x the connection string is stored in App_Data\Settings.txt file.
12 years ago
I looked into Nop.web>app_Data but there was no settings .txt file init.
12 years ago
It's created during nopCommerce installation
12 years ago
Hi Andrei,

Just need to know when doing fresh installation I want to use the existing database which in this case is (testdatabase) used for the same machine locally. The problem is during installation wizzard, nopcommerce ask for the installation of database. But in my case I want to link the newly installed nopcommerce to the existing database. This can be done by changing the connection string, as you mentioned that the database connection lies in the settings.txt , I cant find that within app-data folder , Have i done something wrong during installation or is there any other way of linking the db to existing db , How ca i recover the setting file if it is missing .....thnx
12 years ago
Install nopCommerce to any new empty database. After it's done you'll have \Add_Data\Settings.txt file. Just open it and update your connection string so it points to your old database. Restart the application. After it's done your old database will be used
12 years ago
I have a similar problem. I had a working nopCommerce version with an updated database, did some modifications and tried to install a  new version on a server. Now I need to connect this new nopCommerce version to the existing database.
What should I do? I setup and updated Settings.txt file in the AppData dir, but the site goes to the installation page, then I tried to connect to my database from this page and it failed.
Please, advise.
12 years ago
mkras wrote:
I have a similar problem. I had a working nopCommerce version with an updated database, did some modifications and tried to install a  new version on a server. Now I need to connect this new nopCommerce version to the existing database.
What should I do? I setup and updated Settings.txt file in the AppData dir, but the site goes to the installation page, then I tried to connect to my database from this page and it failed.
Please, advise.


You need to upgrade your database to the version you are planing to use. Also for DB modifications you need to write your own sql script.

here are some links to get more info how to upgrade nopCommerce.

1.5 -to- 1.9>>>
and
1.9 -to- 2.00>>>
12 years ago
Thank you for the reply and links, but this is not exactly what I'm looking for. Let me explain again. I have latest (2.1) NC installed from a scratch. It worked fine without a problem. The database is updated with our company products samples, setups etc. etc. Later I modified some source code (changed UI layout, for example).  Now I need to install (release) my new NC version on a server and connect it to our existing DB. I understand that I can make a new DB, release NC using provided batch files (Deploy.bat, Prepare.bat), then switch the new NC to our existing DB, and delete the new just created DB, but this process doesn't look exactly correct for me.
Our company is currently in evaluation process of the NC and I need to understand how to update existing installed NC for a new customer code modifications.
11 years ago
mkras wrote:
Thank you for the reply and links, but this is not exactly what I'm looking for. Let me explain again. I have latest (2.1) NC installed from a scratch. It worked fine without a problem. The database is updated with our company products samples, setups etc. etc. Later I modified some source code (changed UI layout, for example).  Now I need to install (release) my new NC version on a server and connect it to our existing DB. I understand that I can make a new DB, release NC using provided batch files (Deploy.bat, Prepare.bat), then switch the new NC to our existing DB, and delete the new just created DB, but this process doesn't look exactly correct for me.
Our company is currently in evaluation process of the NC and I need to understand how to update existing installed NC for a new customer code modifications.



Hello mkras, pls i know this has been a long time but am actually having the same problem with u and I cant just get any info from previous posts and am stucked. Have u been able to resolve this and if u have, can u kindly tell me what u did. Cheers
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.