Last post Apr 06, 2011 11:18 AM by nkabir11
Mar 31, 2011 02:18 PM|nkabir11|LINK
Following is the connection string that I am using in my web project. Some time problem arises when I use same project in other PC due to connection string. As I come to know that there is some property in connection string which use current pc as local
pc and establish connection without any issue. So please tell me or give me the code of sql connection string which is accessible database in all the pc.
Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\login.mdf;Integrated Security=True;User Instance=True
Mar 31, 2011 03:19 PM|dahla|LINK
What you are using requires a local sqlserver installation to work, because that is the engine used for reading the mdf file.
If you do not want people to install sqlserver locally then you should look at Sql Server Compact (http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx) which provides you a standalone
database, where a sql server engine is not required
Mar 31, 2011 10:24 PM|nkabir11|LINK
I don't know what you are talking about. I am using Sql Server Express edition which comes with VS2008 I have create database under project and then I am manupulating with database from web form.
Apr 02, 2011 04:23 PM|dahla|LINK
Yes, and that is your problem, because when you use the SqlServer Express for your project (eventhough it creates a database file), then it requires sql server express to be installed on all the machines where you intend to use your database file.
Apr 03, 2011 02:50 AM|nkabir11|LINK
So which Data String is required to install project on web server?
Apr 05, 2011 03:51 PM|dahla|LINK
First you need to grab a provider and create a new database (http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx) and then you can find the connectionstring here http://connectionstrings.com/sql-server-2005-ce
Apr 06, 2011 11:18 AM|nkabir11|LINK
Ok! let me check.