2011-07-06 2 views
1

데이터베이스 읽기/쓰기 작업에서 예외를 catch 할 때 Try-Catch 구성에서 catch하려고 시도해야 할 예외는 무엇입니까?SQL Server 데이터베이스 작업과 관련된 예외

try 
{ 
    MyDatabaseHandlingMethod();    
} 
catch (exception ex)//what to use instead of just "exception"? 
{ 
    //exception handling 
} 

데이터베이스 관련 작업을 수행하려는 경우 "예외"대신 사용할 예외는 무엇입니까? (IOException 같은 파일 처리 작업의 경우)

+0

SqlException 오류 코드를 찾으십니까? http://stackoverflow.com/questions/380547/a-list-of-common-sqlexception-numbers를 참조하십시오. – UrbanEsc

답변

1

당신은 아마 Number 속성이 SQLEXCEPTION을 처리해야합니다.

관련 문제