Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 database dataset
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 26-Jun-13 0:32am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 27 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100