Showing posts with label compact. Show all posts
Showing posts with label compact. Show all posts

Saturday, February 25, 2012

Connection error in sql server compact edition 2005

HI friends,

i m working on device application ..i m using sql server ce 2005 with c#.net ... but when i m trying to connect to database it shows me error that

"the database path not found ... please check the path [,,,filename,,,]"

my code is as below

private string ConnStr = "Data Source =\\My Documents\\Employee.sdf;";

private void cmdCheckConnecton_Click(object sender, EventArgs e)
{
try
{
cn = new System.Data.SqlServerCe.SqlCeConnection(ConnStr);
cn.Open();
MessageBox.Show(cn.State.ToString());
}
catch (SqlCeException ex)
{
MessageBox.Show(ex.Message.ToString());
}
}

i have my database in My Documents and the path is right still it shows the error

pls help if any one have a solution regarding this problem

thanxx

Zalak Shah

This is just a guess, but looking at my connection strings they have quotes around the Data Source, so maybe try adding those in.

private string ConnStr = "Data Source =\"\\My Documents\\Employee.sdf\";";

|||hi

i have done it but still it doesn't work

one more thing i want to tell u .. if i create the database on the same location even it is there it will create once again and no files will be create at that location that 's just a file in a memory .... and after that that memory file will accessed by that code and working perfectly as i needed

can u tell me one thing that location is in mobile device (Emulator) 's location or my hard drive's location

Connection error in sql server compact edition 2005

HI friends,

i m working on device application ..i m using sql server ce 2005 with c#.net ... but when i m trying to connect to database it shows me error that

"the database path not found ... please check the path [,,,filename,,,]"

my code is as below

private string ConnStr = "Data Source =\\My Documents\\Employee.sdf;";

private void cmdCheckConnecton_Click(object sender, EventArgs e)
{
try
{
cn = new System.Data.SqlServerCe.SqlCeConnection(ConnStr);
cn.Open();
MessageBox.Show(cn.State.ToString());
}
catch (SqlCeException ex)
{
MessageBox.Show(ex.Message.ToString());
}
}

i have my database in My Documents and the path is right still it shows the error

pls help if any one have a solution regarding this problem

thanxx

Zalak Shah

This is just a guess, but looking at my connection strings they have quotes around the Data Source, so maybe try adding those in.

private string ConnStr = "Data Source =\"\\My Documents\\Employee.sdf\";";

|||hi

i have done it but still it doesn't work

one more thing i want to tell u .. if i create the database on the same location even it is there it will create once again and no files will be create at that location that 's just a file in a memory .... and after that that memory file will accessed by that code and working perfectly as i needed

can u tell me one thing that location is in mobile device (Emulator) 's location or my hard drive's location

Friday, February 17, 2012

Connecting via Management Studio

hi,

I've installed Microsoft SQL Server Compact Edition 3.1 .I want to connect to via management studio , but I dont khonw how!

SDK says :

1. In SQL Server Management Studio, open Object Explorer.

2. In Object Explorer, click Connect, and then choose SQL Server Compact Edition.

but there is no "Server Compact Edition" !

please help, Thanks

In my installation, it is still called SQL Server Mobile Edition, not Compact Edition, in the Object Explorer > Connect menu.

HTH,
Jon
|||

It is working but I doubt that it is the CE 3.1 !

Thanks.

|||

Your doubt is justified

There's "Compact Edition" all over the management studio

In VS2005 prof i first installed the SP1 then: (in this order)

SSCE31VSTools-enu-exe

SQLServerCE31-EN.msi

SSCE31BOL (Books online)

SSCE31SDK-ENU.msi

After that the newest version of management studio express (SQLServer2005_SSMSEE.msi)

This is how I did connect.

(Though not everything works: see my message somewhere below!

Anne-Jan Tuinstra

|||I Download and install "SQLServer2005_SSMSEE.msi" but the server type in this version is "Database Engine" and I can't change it!(It is disabled)|||Any idea ? Please help!

Connecting via Management Studio

hi,

I've installed Microsoft SQL Server Compact Edition 3.1 .I want to connect to via management studio , but I dont khonw how!

SDK says :

1. In SQL Server Management Studio, open Object Explorer.

2. In Object Explorer, click Connect, and then choose SQL Server Compact Edition.

but there is no "Server Compact Edition" !

please help, Thanks

In my installation, it is still called SQL Server Mobile Edition, not Compact Edition, in the Object Explorer > Connect menu.

HTH,
Jon
|||

It is working but I doubt that it is the CE 3.1 !

Thanks.

|||

Your doubt is justified

There's "Compact Edition" all over the management studio

In VS2005 prof i first installed the SP1 then: (in this order)

SSCE31VSTools-enu-exe

SQLServerCE31-EN.msi

SSCE31BOL (Books online)

SSCE31SDK-ENU.msi

After that the newest version of management studio express (SQLServer2005_SSMSEE.msi)

This is how I did connect.

(Though not everything works: see my message somewhere below!

Anne-Jan Tuinstra

|||I Download and install "SQLServer2005_SSMSEE.msi" but the server type in this version is "Database Engine" and I can't change it!(It is disabled)|||Any idea ? Please help!