Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Error when trying to create SQL database for VWD website

  1. #1
    Join Date
    Apr 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error when trying to create SQL database for VWD website

    I am trying to deploy my website, which is basically a modification of the VWD personal web site. I have read the excellent article "Beginner's Guide to uploading a WVD 2005 Express website" and tried to follow the instructions but my website isn't working.

    What I did was
    1) created a SQL database using Helm and I called this "personal".
    2) Using the Helm database manager I created a user to manage the database. I called this user "Debbie"
    3) I then used myLittleAdmin for SQL Server 2005 to populate the database. Using the Tools I ran a query copied from personal-add.sql (supplied by MS). This did create the tables Album and Photos and stored procedures, but the tables seem to be empty and the stored procedures are prefixed by the user name.
    4) So when I tried to run the website I now get the error
    " Server Error in '/' Applicaton
    Invalid object name 'SiteContent'"

    5) I am connecting to the database with the following in web.config

    <add name="personal" connectionString="
    Data Source=ALUMINIUM;
    Initial Catalog=personal.mdf;
    Persist Security Info=True;
    User ID=Debbie;
    Password=*******;
    Trusted_Connection=False"
    providerName="System.Data.SqlClient" />
    <remove name="LocalSqlServer" />

    <add name="LocalSqlServer" connectionString="
    Data Source=ALUMINIUM;
    Initial Catalog=personal.mdf;
    Persist Security Info=True;
    User ID=Debbie;
    Password=*******;
    Trusted_Connection=False" providerName="System.Data.SqlClient" />

    I'm sure this and all the other errors I've had are due to the fact that my database isn't set up correctly. But can anyone tell me what I did wrong when setting up my database?

  2. #2
    Join Date
    Apr 2005
    Location
    Plymouth, UK
    Posts
    134
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    Hi Debbie,

    I'm not a database developer so not completely sure, but I think it might work if you take off the .mdf after the name of the database. Whenever I setup one I only have to enter the database name (without the .mdf extension).

    Hope that helps.

    Chris

  3. #3
    Join Date
    Apr 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I'm not sure that's the answer..

    .. as I created the database with the name "personal". I think the extension gets added on by the creating app. I've tried connecting without the ".mdf" in the xml web.config file and that produced errors too!

  4. #4
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    The error message you posted implies that the database should contain a 'SiteContent' table or view.

    Unfortunately this is not so easy to diagnose without really having a look at things. However, in the meantime check what tables exist in the development copy of the database and those on the server (in your personal db).

  5. #5
    Join Date
    Apr 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Two tables exist, Albums and Photos, these also appear in my development environment. Sadly though, the tables in the RF database are empty (0 rows) whereas the tables should contain 2 and 47 rows respectively. I could add the stuff by hand as I know what to add, trouble is I can't see how to do this using myLittleAdmin.

    If I read the posting correctly in the Beginners Guide... I should only have had to run the script to create the tables etc and hey presto it should work. Only it doesn't.

  6. #6
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    OK, this narrows things down a bit, since it is quite clear that the script generated only created the database tables. Unfortunately Databases have never really been easy to work with, and I would suggest you have two options.

    1). Take a backup of the local development database and email RFH support asking if they can 'restore' this on the production server. RFH may not be willing to do this / may charge a small administration fee.

    2). Have a look at the 'Database Publishing Wizard'. You should be able to use this to generate a SQL script which you can execute via myLittleAdmin, however if the script is too large you will need to look at creating a simple ASPX page to execute the script (there is a sample and tutorial here). When using the DPW you should pay attention to the known issues, in particular the notes about collations.

    If the resulting script does generate any errors feel free to post here and I'll see if I can help you solve them.

  7. #7
    Join Date
    Jan 2006
    Location
    Buckinghamshire
    Posts
    605
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by Sol View Post
    1). Take a backup of the local development database and email RFH support asking if they can 'restore' this on the production server. RFH may not be willing to do this / may charge a small administration fee.
    I think in the FAQ's they say they do this for £15.

  8. #8
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    Quote Originally Posted by Ourpcman View Post
    I think in the FAQ's they say they do this for £15.
    I thought I had seen a fee for this somewhere but wasn't 100% sure, so thanks for clearing that up. I would add that this fee is quite reasonable since it does invollve a couple of steps and is not just as straight forward as simply restoring the database (for those curious, it would involve ensuring objcet permissions are set correctly as well as changing the paths to the files that make up the database).

  9. #9
    Join Date
    Apr 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, I'll look into creating a script that works and let you know how I get on. Thanks for the information. Otherwise, it seems I have a fall back position, £15 to RFH doesn't sound like a lot after you've spent days getting no where!

  10. #10
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Dont forget about the MyLittleBackup software (accessible via the link given in Helm on your database) - this will allow you to upload and restore database backups.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2nd August 2006, 03:04 PM
  2. Replies: 13
    Last Post: 16th February 2006, 02:40 PM
  3. Replies: 16
    Last Post: 2nd December 2005, 04:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •