Results 1 to 5 of 5

Thread: problem finding database on production machine

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    problem finding database on production machine

    Hi,
    I have a windows app that works great. I can run it on other machines and it still works great. I also wrote a web app that runs locally and displays html pages. I want my web app to read a value from the database (sqlite db) and display one of two start pages based on the value from the database.

    So I have a datagrid and datasource on my web app that are set up like this:
    <asp:GridView ID="GridView1" runat="server" DataSourceID="BEData" Visible="False">
    </asp:GridView>
    &nbsp;
    <asp:SqlDataSource ID="BEData" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>"
    ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="SELECT [is_run] FROM [personalize_info]">
    </asp:SqlDataSource>

    In my web.config file I have the following connection string defined:
    <connectionStrings>
    <add name="ConnectionString3" connectionString="Data Source=c:\Program Files\BE folder\myData.db"
    providerName="System.Data.SQLite" />
    </connectionStrings>

    When my web app opens I look at the datagrid and load a page based on the value I find there.

    This works great on my development machine using the development server.

    I created an install package that puts the primary output from the windows app, the contents files from the web app and the database in the application folder. I installed it on my development machine and run it with the ultidev cassini server. It works perfectly.

    If I install it on any other machine the web app acts like it cannot find the database. If I display the datagrid, it is always nothing. It should contain a 0 or a 1. It does on my development machine but not on any other machine - it is just nothing. I do not get any errors.

    Does anyone know why this is happening and what I can do to read a value from my database on a machine that is not my development machine?

    Thanks for any help.

  2. #2

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    Re: problem finding database on production machine

    One more thing.

    When I run the web app on the development machine and make the datagrid visible. I can see either a 1 or a 0 in the datagrid. When I install on the development machine I see the same thing.

    When I install on a different machine, I don't see the datagrid at all.

    What is going on?

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    Re: problem finding database on production machine

    Please, isn't there anyone out there that can comment on possible areas to check out? I have been trying everything I can think of.

    I do not receive an error of any kind. But on my development machine, the dataview gets built (you can see the commands if you view the code) and filled with the value from the field in the database.

    On any other different machine, the dataview does not get built at all. If you view the code while the web app is up and running, it shows the html for the rest of the page but where the dataview should be, there is nothing in the html.

    Come on guys - I need a little help here..
    Thanks!!

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: problem finding database on production machine

    Does c:\Program Files\BE folder\myData.db exist on the production machine? What steps did you take, when creating the installer, to ensure that it would exist? You should take a look at the files 'generated' by the installer on the production machine to see if the .db file exists and if the web.config is pointing to the right place.

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    Re: problem finding database on production machine

    The default installation directory is c:\Program Files\BE Folder so as long as you just click 'next' on installation, it will exist. the db file is added to the application folder. On the production machine I can go to c:\Program Files\BE Folder and I can find the db file, myData.db. I think the web.config file points to the correct place. It looks the same on the production machine as it does on the development machine.

Posting Permissions

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



Click Here to Expand Forum to Full Width