라벨이 ASP인 게시물 표시

[ASP] ASP에서 PHP의 substr_count 기능 구현하기

PHP의 substr_count 는 문자열 중 찾는 문자열이 몇번이나 들어있는지 검사해주는 함수이다. 자세한 설명은 링크 참고 :   http://php.net/manual/en/function.substr-count.php 이 기능을 ASP에서 구현하고자 한다면 아래처럼 사용하면 된다. cont = "This is a test" tmp = split(cont, "is") count = ubound(tmp)

[ASP] CLOB insert, select하기

CLOB 데이터 넣기(INSERT) '저장할 시퀀스를 가져온다. sql = "select 시퀀스 이름.nextval as no from dual" Set rs = cn.Execute(sql) no = rs("no") rs.Close Set rs = Nothing 'CLOB 데이터에 empty 값을 삽입한다. sql = "insert into 테이블 이름(no,content) values(?,empty_clob())" Set cmd = Server.CreateObject("ADODB.Command") With cmd .ActiveConnection = connectString .CommandType = adCmdText .CommandText = sql .Parameters.Append .CreateParameter("@no", adInteger, adParamInput, ,no) .Execute End With '실제 값을 삽입한다. sql = "update 테이블이름 set content=? where no=?" set ocmd = Server.CreateObject("ADODB.Command") With ocmd .ActiveConnection = cn .CommandType = adCmdText .CommandText = sql .Parameters.Append .CreateParameter("@content", adLongVarWChar, adParamInput, 10000,content) .Parameters.Append .CreateParameter("@no", adInteger, adParamInput, ,no) .Execute End With CLOB 데이터 읽기(...

[ASP] Server.CreateObject를 호출하지 못했습니다. 이 개체에 액세스할 수 없습니다.

Server.CreateObject를 활용하던 도중 아래와 같은 오류를 만났다. 006~ASP 0178~Server.CreateObject 액세스 오류~사용 권한을 확인하는 동안 Server.CreateObject를 호출하지 못했습니다. 이 개체에 액세스할 수 없습니다.   찾아보니 오류 문구 그대로 생성하려는 객체에 대한 권한이 없어서 발생하는 오류였다. 해결 방법은 아래와 같다. 관리도구->구성요소서비스->컴퓨터->내컴퓨터->COM+ 응용프로그램->IIS Out-Of-Process Polled Applications 에서  권한부여 항목의 "이 응용 프로그램에 대한 액세스 검사 수행"을 체크해제