Problem with data when I deploy my app. RRS feed

  • Question

  • Hi all,

    I hope I have posted this in the right place, apologies if not.

    I have developed a windows forms application with an sql database which is local to my project. All the database contains is two tables - one is a lookup table, the other is a table which is used to populate a .rdlc report. Everything works perfectly when I debug my application, but now I have deployed my application it can't see either of the tables in the database.

    What am I doing wrong? I'm not sure where to start so if you can help me please let me know what info I need to provide!


    Thursday, February 7, 2008 11:03 AM


All replies

  • In a Winform application you have two options either create Views for the columns you need for each report or use SQL Server Express Advanced services which lets you use Reporting services free. The reason is when you use Report Viewer in local mode in Winform most reasonable operations run but yours is not running so you are doing some thing to break it. That could load related because you have only one table instead of many as required by relational modeling. So here is code sample from Microsoft and the SQL Server Express Advanced use the ToolKit version if you choose to use it because in reporting services I have written reports with default 163 pages before deployment. 






    Thursday, February 7, 2008 7:16 PM
  • Hi Caddre

    Thanks for your reply. I will have a good read and hopefully it will help. Just a thought though, I'm not sure it is the reporting component that is the problem, I think it is the database itself. The reason being, I also have a datagridview within my application which is supposed to display the data from the lookup table. Again, this works when I debug my application, however does not work after I deploy.


    Friday, February 8, 2008 8:49 AM
  • OK, I have a bit more information. My application works correctly when I deploy using ClickOnce, but does not work correctly when I use a setup project. So, as I suspected, it is not the reporting component which is the problem it is my method of deployment.

    Do I have to copy the database to the setup project? I thought this would be added automatically, the same as the forms etc.

    Any thoughts?


    Friday, February 8, 2008 12:56 PM
  • Hi All

    Please see my previous thread from a different forum. I've reposted here because I believe it is now more relevant to deployment than it is to data.


    Please help!


    Friday, February 8, 2008 1:05 PM
  • No it does not you either use detach and attach or backup and restore in code with your setup project.


    Friday, February 8, 2008 2:06 PM
  • Ok now I'm lost! This is completely new ground to me (but that's understandable since this is my first major project). Could you kindly explain in a little more detail?
    Friday, February 8, 2008 2:39 PM
  • If you created the database in VS you copy the database and attach it to SQL Server, so you are detaching it from VS and attaching it to SQL Server.  So you add all your connection information to this database in your app.config file so after deployment you can still connect to your database.  Here are some code samples using both ADO.NET and T-SQL to create a database.  You have the option of moving the database first or move it with your deploment setup.






    Friday, February 8, 2008 3:28 PM
  • Caddre


    Thank you very much for the info, it is much appreciated. I'm sure I'll find the answer here.





    Friday, February 8, 2008 3:40 PM
  • Caddre


    Again, thank you very much.



    Friday, February 8, 2008 3:57 PM