none
Set Up Intsallation Questions RRS feed

  • Question

  • I am beginner at .net. I published a simple c# data base application using access. I got unhandled exception message telling that my access data base has not been found on C:\Documents and Settings\dev\Local Settings\Apps\2.0\Q2OV4X0P.21N\289BKV65.JJQ\wind..tion_ea5c846a90b2216a_0001.0000_a4f4bce74c8b7830.

    When it runs the grid does not have data. So I copy the databasename.md5 on the directory above. After that the grid already has contents. There are no longer error message every time I run the application. My questions are, what is this directory? Why do I need to copy my access database file there, should it be that when I publish my application the database will be copied on appropriate destination for the application to run properly? Or maybe my code has bug?

    • Moved by Alexander Sun Thursday, August 18, 2011 9:59 AM (From:.NET Framework Setup)
    Tuesday, August 16, 2011 3:11 AM

Answers

  • I double checked your previous post. It looks you let client machine in the same LAN to access the SQL Server of your machine. First, this idea makes sense. But I didn't find very helpful error information in previous ones. So I suggest you can double check this KB about how to configure SQL Server 2005 to allow remote connections. http://support.microsoft.com/kb/914277

    Please feel free to let us know if it doesn't work. PS. please provide more detailed error information such as error code, error description, etc. to help us analyze your question better.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Larcolais Gong Wednesday, August 24, 2011 9:30 AM
    Saturday, August 20, 2011 12:46 PM

All replies

  • The above mentioned path is application cash folder where all the click one applications are installed. This path can not be changed if you want to modify the installation path you must create Setup and deployment project.

    Make sure that you have the data base file included in your click one setup.

     


    Please mark those posts as answer which answers your question. Faraz
    Tuesday, August 16, 2011 3:57 AM
  • How can I make a centralize ms access database file, in which when the application was installed on different computers on a netwrok, they will only access a single database like databasename.md5?

    Do I need to change something on the code below?

    string connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=databasename.mdb";


    Does the client computers need to have an access installed?
    Tuesday, August 16, 2011 5:19 AM
  • Yes you will need to modify the connection string, Data Source

    More info on connection string http://www.connectionstrings.com/

    I have never seen a access database centralized before.

    if you need to centralize a Data base i prefer to go with SQL server, I doubt that access will allow multiple connection at the same time.

     

    Does the client computers need to have an access installed?

    No, I do not think so that you need access installed on every client.


    Please mark those posts as answer which answers your question. Faraz
    Tuesday, August 16, 2011 7:28 AM
  • Yes you will need to modify the connection string, Data Source

    More info on connection string http://www.connectionstrings.com/

    I have never seen a access database centralized before.

    if you need to centralize a Data base i prefer to go with SQL server, I doubt that access will allow multiple connection at the same time.

     

    Does the client computers need to have an access installed?

    No, I do not think so that you need access installed on every client.


    Please mark those posts as answer which answers your question. Faraz
    I see, I have just tried using sql server express 2005 with c-sharp after publishing it, I tried installing it on my pc it runs, then I run the set up on another computer on a network, and the application has been installed, but when I try to open the application that I installed on another computer, it tells an error message and the application did not open? The SQL server was installed on my computer.

    Tuesday, August 16, 2011 7:41 AM
  • What was the error?

    Have modified the Connection string for SQL server (Both provider and data source ) ?

    Have you configured SQL server to allow remote connection?


    Please mark those posts as answer which answers your question. Faraz
    Tuesday, August 16, 2011 8:08 AM
  •  I have allowed remote access on my pc (the server), the remote access on my sql server 2005 is also allowed.

    Below is the error message it had shown after running it(after installing)on other pc.

     

    EventType : clr20r3     P1 : program3.exe     P2 : 1.0.0.0     P3 : 4e4c5c7e

    P4 : system.data     P5 : 2.0.0.0     P6 : 4889deaf     P7 : 2753     P8 : 29

    P9 : system.data.sqlclient.sql  .

     

    In my project properties I pick the download prerequisites from the same location. Then pick install from cd-rom and dvd-rom, then I just copy the set files on the client computer,and run the set up. 

    Below is the simple program, that just display database content on datagridview. This runs on my pc.

     

     

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms;

    using System.Data.SqlClient;

    namespace program3
    
    {
    
        public partial class Form1 : Form
    
        {
    
            BindingSource bindingSource;
    
            DataTable dt;
    
            DataSet ds;
      SqlDataAdapter dbadapter;
    
    
            string connect = "Server=vik\\SQLEXPRESS;DataBase=rnn;Integrated Security=SSPI";
    
    
            public Form1()
    
            {
    
                InitializeComponent();
    
                SqlConnection dbconnect = new SqlConnection(
    
                   "Server=vik\\SQLEXPRESS;DataBase=rnn;Integrated Security=SSPI;");
    
    
                dbconnect.Open();
    
                SqlDataAdapter dbadapter = new SqlDataAdapter("select *from employee", dbconnect);
    
          
                dt = new DataTable("employee");
    
                ds = new DataSet();
    
                dbadapter.Fill(ds, "employee");
    
                dbadapter.Fill(dt);
    
                bindingSource = new BindingSource();
    
                bindingSource.DataSource = dt;
    
                dataGridView1.DataSource = ds;
    
                dataGridView1.ReadOnly = false;
    
                dataGridView1.AllowUserToResizeColumns = true;
    
                dataGridView1.DataMember = "employee";
    
            }
    
    
            private void Form1_Load(object sender, EventArgs e)
    
            {
    
    
    
            }
    
        }
    
    }
    
    
    Note: I tried creating a program with forms, no sql connection, it runs on another pc.
    Thursday, August 18, 2011 3:11 AM
  • Hi Jambyvedar,

     

    Welcome to the MSDN forum.

     

    I am sorry that this queue is about .NET Framework Setup. In my opinion, your problem is related to Data, and I will move your thread to Data forum for better support.

     

    Thanks.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 18, 2011 9:58 AM
  • Hello,

    Thank you for posting.

    I'm not very sure if your question was really related to ADO.NET or not. Well, for providing better support and suggestion, I suggest you send a demo project to me to analyze your question. v-xugong@microsoft.com

    Please feel free to let us know if you have any progress.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 18, 2011 3:15 PM
  • Now I know why the client does not connect on the sql server 2005 express in my c# program, it's the windows firewall, when ever I turn it off, my program runs on the client computer. But should the firewall already allow the client to access the sql server, after all I can open the sql server on my pc(server), which means the firewall does not block the port where sql server opens up?

    I am not familiar with firewall, but to address this issue, should I create new inbound rules then add the port that sql server 2005 uses? What is the port that sql server 2005 use? Thanks.

    Friday, August 19, 2011 10:51 PM
  • I double checked your previous post. It looks you let client machine in the same LAN to access the SQL Server of your machine. First, this idea makes sense. But I didn't find very helpful error information in previous ones. So I suggest you can double check this KB about how to configure SQL Server 2005 to allow remote connections. http://support.microsoft.com/kb/914277

    Please feel free to let us know if it doesn't work. PS. please provide more detailed error information such as error code, error description, etc. to help us analyze your question better.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Larcolais Gong Wednesday, August 24, 2011 9:30 AM
    Saturday, August 20, 2011 12:46 PM