Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
currently i been working on University project, i make my database in sql server 2008. in C# side i call the database through dataset (virtual database), when ever i try to run my project on another PC it's give error that no database connected. while i have paste the backup copy of database to the other PC...what is the solution. i dont understand.. thanks in advance.
Posted

Check your ConnectionString.
You have to change ConnectionString
e.g.
the SQL server name, and database Name with Systems Server Name and dbName.

Regards,

Nirav Prabtani.
 
Share this answer
 
Plz Check your connection string.
The connection string to connect to the SQL server instance needs to be changed - i.e. the SQL server name, and database Name metch with Systems Server Name and dbName.
 
Share this answer
 
You can't "copy" SQL Server, you need to have it installed on the other machine and to have your connection string set up accordingly.
If you have used SQL CE, than you need to deploy all the SQL CE engine in one or the other way.
Please check following links:
http://msdn.microsoft.com/en-us/library/vstudio/bb546200(v=vs.100).aspx[^]
http://msdn.microsoft.com/en-us/library/vstudio/aa983326(v=vs.100).aspx[^]
http://msdn.microsoft.com/en-us/library/bb522540(v=sql.105).aspx[^]
 
Share this answer
 
Two major possibilities spring to mind:
1) (Simple to fix) The connection string to connect to the SQL server instance needs to be changed to fit the new environment - i.e. the SQL server available from this machine has a different name, or access details.
2) (Rather harder) The new PC does not have access to any SQL server instance. This means either installing SQL server somewhere where the PC can access it, or changing you software to use a single user database system instead.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900