locked
Data connection details while migrating to higher environment. RRS feed

  • Question

  • Hi All,

    I have created a aspx page in Sharepoint designer that has datagrid and dropdown list controls. both dropdown and datagrid is binded with sql database. i have created the page in dev environment. now i am moving this page to production. as controls on page does point to the dev env SQL server so i suppose now i have to get controls to point to production dev server. could anyone of you please tell me how can i do it? do i need to configure the database connection details again in page? Can't  i move page as it is in production with some trick? thanks in adv.

    Regards Amit

    Saturday, February 12, 2011 10:00 AM

Answers

  • If I understood your post correctly, I think you have to open up the production page in SharePoint Designer and make some changes. Your dev page and controls on that page is using connection to dev sql server. Even if you move the page in production, it'll still point to dev sql server.

    You can probably go into the code view of the page and make the necessary changes to make sure that they are pointed to the production sql server. I can't tell you exactly what code you'll need to change, but I think it'll easier to just reconfigure the data connection using the SharePoint Designer Interface.

     


    Pman
    http://www.pmansLab.com/
    • Marked as answer by Peng Lei Monday, February 21, 2011 5:09 AM
    Saturday, February 12, 2011 5:23 PM
  • > but can't it possible that data connection pick connection details from some configuration file or something.

    I'm not aware of any configuration file that you can tweak so that all of your dataviews will dynamically change it's source. Someone might reply here if there is. However, even if there was any such file, your dataview is not using it right now. You'll still need to get into coding and make appropriate changes so that it refers to the configuration file (if it exists).

    > I don't feel comfortable to make changes in content on production.

    If your dataview is just for the purpose of reading data from the source and then presenting to the user, you might as well create it using the data from production sql. Reading data from production sql shouldn't be alarming. If you're writing data to your sql source, then yes, use a development environment first.

    > make change in signle page is fine but if let say we have 30 pages in one solution then 30 pages are needed to change in production. I suppose it will take a lot of time while appying the patch on production.

    Once you create your dataview that reads/writes data, you can export it and import the webpart on a different page instead of going through the codes again. But this only applies if all/any of 30 pages has the exact same dataview.

     

    I should've asked this first, you mentioned in your original post about "datagrid" and I'm referring to "dataview". Are we on the same page here :)



    Pman
    http://www.pmansLab.com/
    • Marked as answer by Peng Lei Monday, February 21, 2011 5:09 AM
    Saturday, February 12, 2011 11:46 PM

All replies

  • If I understood your post correctly, I think you have to open up the production page in SharePoint Designer and make some changes. Your dev page and controls on that page is using connection to dev sql server. Even if you move the page in production, it'll still point to dev sql server.

    You can probably go into the code view of the page and make the necessary changes to make sure that they are pointed to the production sql server. I can't tell you exactly what code you'll need to change, but I think it'll easier to just reconfigure the data connection using the SharePoint Designer Interface.

     


    Pman
    http://www.pmansLab.com/
    • Marked as answer by Peng Lei Monday, February 21, 2011 5:09 AM
    Saturday, February 12, 2011 5:23 PM
  • Thanks Pman for you reply. I really appriciate your help.

    I can reconfigure the data connection in pages on production but can't it possible that data connection pick connection details from some configuration file or something. If we would achieve this we wouldn’t need to edit the page on production. I don't feel comfortable to make changes in content on production.

    In some companies, hosting team even doesn’t let developer to touch the production server then how developer will make changes in page in such case. I think there should be some trick to store the configuration in some file or some list.

    make change in signle page is fine but if let say we have 30 pages in one solution then 30 pages are needed to change in production. I suppose it will take a lot of time while appying the patch on production. Also we can't ignore the possibility to miss the page by mistake.

    Regards Amit K

    Saturday, February 12, 2011 8:19 PM
  • > but can't it possible that data connection pick connection details from some configuration file or something.

    I'm not aware of any configuration file that you can tweak so that all of your dataviews will dynamically change it's source. Someone might reply here if there is. However, even if there was any such file, your dataview is not using it right now. You'll still need to get into coding and make appropriate changes so that it refers to the configuration file (if it exists).

    > I don't feel comfortable to make changes in content on production.

    If your dataview is just for the purpose of reading data from the source and then presenting to the user, you might as well create it using the data from production sql. Reading data from production sql shouldn't be alarming. If you're writing data to your sql source, then yes, use a development environment first.

    > make change in signle page is fine but if let say we have 30 pages in one solution then 30 pages are needed to change in production. I suppose it will take a lot of time while appying the patch on production.

    Once you create your dataview that reads/writes data, you can export it and import the webpart on a different page instead of going through the codes again. But this only applies if all/any of 30 pages has the exact same dataview.

     

    I should've asked this first, you mentioned in your original post about "datagrid" and I'm referring to "dataview". Are we on the same page here :)



    Pman
    http://www.pmansLab.com/
    • Marked as answer by Peng Lei Monday, February 21, 2011 5:09 AM
    Saturday, February 12, 2011 11:46 PM