SQL Server 데이터베이스 연결을 사용하는 C#으로 Windows Form 응용 프로그램을 개발했습니다. 나는 .NET Framework 4.0과 SQL Server 2008 R2에서 그것을 개발했다. 내 응용 프로그램은 AG.mdf
이라는 응용 프로그램의 루트 디렉토리에있는 로컬 데이터베이스를 사용하고 있습니다.C# 클라이언트의 시스템에서 데이터베이스가 실행되지 않는 Windows Form 응용 프로그램
이 내 연결 문자열입니다
Data Source=.;AttachDbFilename=|DataDirectory|\\AG.mdf;Integrated Security=True;User Instance=True
내가 내 응용 프로그램에서 새 프로젝트로 Visual Studio를 설치 템플릿 내부에 설치 프로젝트를 추가하여 설치 프로그램을 만들었습니다. 설치 프로젝트를 빌드하고 설치 프로그램을 만들었습니다. 내 사용자의 시스템에 응용 프로그램을 배포 응용 프로그램이 처음 시작하지만 갑자기 오류를
Unhandled exception has occurred in your application. If you click continue, the application will ignore this message and attempt to continue. If you click quit, the application will close immediately.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
P.S 팝업 : 나뿐만 아니라 내 사용자의 시스템에 .NET 프레임 워크 4.0의 SQL Server Compact Edition을 설치 한!
내가 프로그래밍을 종료해야 :. 난 당신이 익스프레스 에디션과를 얻는 것 같아요 '(
프로그래밍을 종료하지 마십시오. – rptwsthi
클라이언트 시스템에서 AttachDbFileName = 접근법을 사용하여 SQL Server 데이터베이스를 사용하는 경우 - 클라이언트에 ** SQL Server Express **가 설치되어 있습니까? –
@marc_s 아니요, 클라이언트 컴퓨터에 SQL Server Express가 설치되어 있지 않지만 SQL Compact가 설치되어 있습니다. – sohaiby