none
Format of the initialization string does not conform to specification starting at index 0.

    Question

  • hi,
    i'm going to make a database connection for my smart device project, like this:
    private void Login_Load(object sender, EventArgs e)
            {
                string connString = @"\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\restaurantdb.sdf";
                using (SqlCeConnection connection = new SqlCeConnection(connString))
                {
                    try
                    {
                        connection.Open();
                        MessageBox.Show("Connection success", "");
                    }
                    catch (Exception ex)
                    {
                        string msg = ex.ToString();
                        MessageBox.Show(msg, "");
                    }
                }

            }
    and when i try to deploy the project, it show me the message "Format of the initialization string does not conform to specification starting at index 0.".whats wrong with my code?
    Friday, August 07, 2009 1:04 AM

Answers