vba & sqlite connection 시 rst.open

VBA로   sqlite를 접속하여 데이터를 처리하려니까....

레코드셋을 가져오는데  다음과 같이 하면 안되더라...

 

' OPEN RECORDSET

rst.Open strSQL, conn

 

꼭 다음과 같이 해주어야 데이터가  제대로 조회된다.

rst.Open strSQL, conn, 1 ,  1

 

모르면 시간 뺏기고, 삽질의 연속이다.

 

recordset.Open [Source], [ActiveConnection], [CursorType], [LockType], [Options]

Source : 테이블, 쿼리 또는 활성화 되어 있는 Command 객체의 참조변수

ActiveConnection : 유효한 연결문자열 또는 활성화 되어 있는 Connection 객체의 참조변수

CursorType : 커서(레코드셋) 유형

LockType : 잠금 형식 (디폴트 = adLockReadOnly)

Options : 레코드셋 구성 옵션 (adCmdText, adCmdTable, 등)