입니다
BA 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)lockquote
처럼 나에게 오류를 보여주는 것입니다 문자열을 사용하면 SQL Server가 대상 컴퓨터에 설치되어 있음을 나타냅니다. . 사용 된 형식은 응용 프로그램에 SQL Server의 로컬 RUNNING 인스턴스에 제공 한 .mdf 파일을 첨부하고 첨부하도록 응용 프로그램에 지시합니다. 원격 서버를 사용하려면 서버 자체를 가리 키도록 연결 문자열을 약간 다시 작성해야합니다. 내 컴퓨터는 SQL 명시 적 인스턴스가 실행되는 서버가 될 것입니다 - :
data source=(MY MACHINE)\sqlexpress;initial catalog=DailyExpense;integrated security=True
: 연결 문자열은 유사 보일 것이다. - sqlexpress는 SQL 인스턴스의 이름입니다 (기본값은 sqlexpress 임). - DailyExpense는 데이터베이스 이름입니다 (데이터베이스 이름이 제공 한 mdf 파일과 같다고 가정).
해당 PC에도 SqlExpress가 설치되어 있습니까? –
예, SqlExpress가 설치되어 있으면 동일한 오류가 발생합니다. –
.mdf 파일을 사용하는 동안 클라이언트 측 SqlExpress를 설치해야합니까? –