database help

Discussion in 'Databases' started by COMPCAD, Mar 9, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have created an application using Visual Web Developer 2010 and I also have a database connected to this application and I also have the application connected to my website it works fine but does not notice the database how do I get the database connected to my application so it will work within the website. I have included my web address which is:
    MULTLAWLIB.ORG it is best viewed in Internet Explorer. I have also included some .GIF images that will help navigate you to the application and also help you create the error that I seem to be getting when I run the application from within my website.
     

    Attached Files:

  2. ...Is it a SQL Express DB?
     
  3. Yes. I am not sure because when I was migrating to SQL I ended up going from SQL 2005, 2008 Express, SQL 2008 R2. When I open SQL Server Management Studio I see it there.
     
  4. If it is a SQL Express DB the way you can use it is the Attach DB feature in the Control Panel for your site. To do that however you need to add a SQL Server to your account.
    I've already created a step-by-step Webcast for doing that if you're interested.
     
  5. Yes I am very interested. Thank You
     
  6. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    COMPCAD,

    I can't reproduce the error. When I click on Catalog, then Text, the next page loads into the left frame. The GIF files are also too small so I can't see the error you're getting.
     
  7. here are the images enlarged. I am unable to send an enlarged copy of the first two pages you should be able to use the smaller pages. You will need to use Internet Explorer to get website to work correctly
     

    Attached Files:

  8. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Thanks COMPCAD. Could you provide the connection string you're using? Please don't share your username/password. You can block it out with asterisks '*'. Please also make sure you add this line to your web.config file:

    <remove name="LocalSqlServer" />

    before the add name section.
     
  9. Here is the web config file that came from my application.
     

    Attached Files:

  10. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    COMPCAD,

    Your web.config should look more like this:

    Code:
    <connectionStrings>
         <remove name="LocalSqlServer" />
         <add name="cat181ConnectionString1" connectionString="*****" 
              providerName="System.Data.SqlClient" />
    </connectionStrings>
    Replace the "*****" with the connection string found in your Control Panel:

    https://my.discountasp.net/mssql.aspx
     
  11. Hi

    Its been awhile since I could try the ideas you gave to me last week I am still having problems. I have included my revised WEBCONFIG.

    <?xml version="1.0"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>
    <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="cat181ConnectionString1" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;User ID=SQL2008R2_219471_libdatabase_user; "
    providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
    </system.web>
    </configuration>

    I have included my web addresshttp://multlawlib.org

    the steps to get to the error:
    1 click on catalog
    2 click on text
    3 click the radio button called title
    4 type TAX in the textbox and click on Search
    5 you will then get the error I am getting
     
  12. Try it like this, make sure you replace the Password but leave the rest:

    <connectionStrings>
    <clear/>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k512.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;User ID=SQL2008R2_219471_libdatabase_user;Password=YourPW" providerName="System.Data.SqlClient"/>
    <add name="cat181ConnectionString1" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;Persist Security Info=True;User ID=SQL2008R2_219471_libdatabase_user;Password=Tsalagi01" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
  13. Hi

    I tried your code and I am still getting error messages below is the code I put into my WEBCONFIG.

    <?xml version="1.0"?>

    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->

    <configuration>

    <connectionStrings>
    <clear/>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k512.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;User ID=SQL2008R2_219471_libdatabase_user;" providerName="System.Data.SqlClient"/>
    <add name="cat181ConnectionString1" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;Persist Security Info=True;User ID=SQL2008R2_219471_libdatabase_user;" providerName="System.Data.SqlClient"/>
    </connectionStrings>

    <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
    </system.web>

    </configuration>

    I have included my web address http://multlawlib.org

    the steps to get to the error:
    1 click on catalog
    2 click on text
    3 click the radio button called title
    4 type TAX in the textbox and click on Search
    5 you will then get the error I am getting
     
  14. ...Are you the one that sent me Emails yesterday?

    I'm willing to provide hands-on help with this.
    My guess is, if what I posted isn't working, that you are using a minimalist web.config

    Which IDE are you using btw, VS2010?
     
  15. Hi

    I did not email you yesterday but I did send a message via the forum.

    I am using Visual Web Developer 2010.

    Stephen
     
  16. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Stephen,

    You forgot to include your password in the connection string.
     
  17. Hi

    How do I find out what the password is because I never set one up on my MSSQL DATABASE that runs my asp application nor the SQL DATABASE I purchased from DISCOUNTASP.NET.

    Stephen
     
  18. mjp

    mjp

    It's the same as your Control Panel login password.
     
  19. Hi

    I tried using the password I use to log into the DISCOUNTASP.NET control panel and it came up with the error I attached to this reply and I also attached the code from my WEBCONFIG.

    <?xml version="1.0"?>

    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->

    <configuration>

    <connectionStrings>
    <clear/>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k512.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;User ID=SQL2008R2_219471_libdatabase_user;Password=1Z1890" providerName="System.Data.SqlClient"/>
    <add name="cat181ConnectionString1" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_219471_libdatabase;Persist Security Info=True;User ID=SQL2008R2_219471_libdatabase_user;Password=1Z1890" providerName="System.Data.SqlClient"/>
    </connectionStrings>

    <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
    </system.web>

    </configuration>
     
  20. ...If you want me to fix it for you I'll need your DASP Control Panel login info.
    Don't be concerned, I've done this for many customers for years now.

    If that will work for you send me a PM with the long and I'll take a look.
     
  21. Hi

    I would love for you to look at it the only thing is I do not understand what you are talking about hear. Could you please rephrase what you are requesting here: If that will work for you send me a PM with the long and I'll take a look.

    You are requesting the User Name and Password for DISCOUNTASP.NET control panel should I email it to you.
     
  22. ...Correct. I just need that to log in and be able to access your site and fix the web.config then no need to worry once it's working I do not keep any info at all, no need to change the password or anything. The DASP Staff trusts me and this is what I do for free.

    I did get your PM and I'll try to look into that a little later today, have to run to the hardware store right now for some plumbing parts, again. This old house haunts me.

    UPDATE: Currently under Tornado watch, Sever storms (Tennessee)...Have to shutdown everything for the evening.
    I'll do my best to get with this very soon.
     
  23. UPDATE: Thursday 24 March

    I went in and added the correct changes for both of the web.config's on your site.
    The one in the root of the site and the one in Catalogs both connect to your SQL Server now.

    You have a new error, object CARD_CATALOG can't be found.

    I can see by the code on the site that you are learning/experimenting.

    If you need help with that next part post here in the forums, we do our best to help.
    All the best,
    Mark
     
  24. Hi

    I would love to have your help on the next step.

    Stephen
     
  25. ...Roger that. It will take me more time but I'll look into it.
    There may not be anything I'm able to do however as the object may actually be missing on the DASP SQL Server. If it is I won't be able to know for sure but I'll try and make a good guess anyway. ;-)
     
  26. OK...I just went back into your site and looked around to see what might be causing the error.
    You don't even have App_Code or App_Data folders on the site.

    Mind if I suggest you watch a few of the videos on the ASP.NET site?

    There really isn't much use to helping with this until you get a better handle on it.
    (I don't want that to sound insensitive.)

    Start here > http://www.asp.net/web-forms
     
  27. Hi
    Thank you for those videos I put them in my favorites and have started watching them. I had created an earlier version of the application it was created with MS ACCESS 2003 and I also installed the APP_DATA folder and had my database put into it and I had published it onto my website several years ago without a problem. I then upgraded to MS ACCESS 2007 and found that ACCESS 2007 can not be used so I migrated to IIS 7 and then I migrated my database to SQL. I then recreated the application and I could not figure out how to bring my SQL database over to the upgraded application so I left the APP_DATA folder off the application and I went to WEBAPPLICATION2 and thought I found someway to publish the application and have the database follow. Your help has been very helpful.

    Stephen
     

    Attached Files:

  28. ...Awesome. ;-)
     
  29. Hi

    I was wondering if you were able to take a look at the info I just sent such as the the .PDF file. I need to get the SQL Database from SQL Server Management Studio into my APP-DATA folder within my application within Visual Web Devloper 2010. I do not know how to go about doing that. If you need more info I can send. Thanks for all the help you have give to me so far.

    Stephen
     
  30. ...Just took a look.

    When you create locally with any Visual Studio IDE and it creates/uses a SQL Express DB you need to use the Attach feature in your DASP control panel.

    It's a two step procedure when you create ASP.NET DBO's in your site that make reference to the actual Database records.

    Something to keep in mind is the Attach feature will wipe out your existing DASP SDL Server records.

    This is rather confusing at first but once you get used to it you will most likely stop using SQL Express on your local system.
    You can work with your local files and have your Data server be your actual remote DASP SQL Server, which eliminates all these middle steps.

    You can also use Data pump features withing a local copy of SQL Server but that is problematic and requires you to run once locally then pump your changes to the remote.

    There's a lot to learn, don't get frustrated. ;-)
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page