Thursday, March 29, 2012

Direct access to SQL Server 2005 from Windows Mobile

Hi everyone,

I've created a SQL Server database in Visual Studio 2005 and I am also planning to create a Windows Mobile application to access, edit and update this data.
So I heard that it is possible to directly access to SQL Server from the device using SQLClient rather than creating an SQL ServerCE.

I tried to use that method but I get a connection error. Here is the bit of code that was generated.

this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = "Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirecto ry|\\MainRestaurantManagementdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;";
}


Can anyone help me on this please as I am stuck and can't figure out how to solve it?

Quote:

Originally Posted by Hezal

Hi everyone,

I've created a SQL Server database in Visual Studio 2005 and I am also planning to create a Windows Mobile application to access, edit and update this data.
So I heard that it is possible to directly access to SQL Server from the device using SQLClient rather than creating an SQL ServerCE.

I tried to use that method but I get a connection error. Here is the bit of code that was generated.

this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = "Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirecto ry|\\MainRestaurantManagementdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;";
}


Can anyone help me on this please as I am stuck and can't figure out how to solve it?


Moved to SQL forum. This is more of an applications issue then a mobile specific issue.

No comments:

Post a Comment