일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 드립 커피
- 태그를 입력해 주세요.
- 프렌치프레스
- 라이트 로스팅
- 템플릿
- 함수
- NGUI
- Android
- Unity
- 아라비카
- xamarin.forms
- liberica
- Classic ASP
- fso
- 자마린
- 원두
- robusta
- 제주도
- KO
- 커피
- xamarin.android
- xamarin
- 미디엄 로스팅
- asp
- vbscript
- shared
- 수마트라 원두
- ServerVariables
- KnockoutJS
- 여행
- Today
- Total
개발人
getrows() 본문
table명 = table
---------------------------------------------
idx | name | subject | content
---------------------------------------------
3 | aaa | 1111 | a1a1a1
---------------------------------------------
2 | bbb | 2222 | b2b2b2
---------------------------------------------
1 | ccc | 3333 | c3c3c3
---------------------------------------------
위와 같을 경우................
sql = "select * from table"
rs = Server.CreateObject("adodb.RecordSet")
rs.open sql,db
if not rs.eof then
******************************************
do until rs.eof or bof
rs(0)
rs(1)
....
rs.movenext
loop
******************************************
end if
에서
***************** 로 둘러싸인 부분을
arrTable = rs.GetRows()
for i=0 to Ubound(arrTable,2)
for j=0 to 3
Response.Write arrTable(j,i)
next
next
이렇게 해도 같은 결과가 나옵니다...
getRows메소드는 레코드셋값을 2차원 배열로 반환을 합니다.
-------------------------------------------------------------
idx | name | subject | content
-------------------------------------------------------------
arrTable(0,0) | arrTable(1,0) | arrTable(2,0) | arrTable(3,0)
-------------------------------------------------------------
arrTable(0,1) | arrTable(1,1) | arrTable(2,1) | arrTable(3,1)
-------------------------------------------------------------
arrTable(0,2) | arrTable(1,2) | arrTable(2,2) | arrTable(3,2)
-------------------------------------------------------------
위와 같이 말이죠.................
도움이 되시길.........
'Classic ASP' 카테고리의 다른 글
ASP - Dictionnary 객체,Scripting 객체 (0) | 2015.05.24 |
---|---|
FSO를 이용한 스킨 및 템플릿 방식을 클래스로 만들어본것입니다. (0) | 2015.05.24 |
DB 에 연결된 select box 사용시 (0) | 2015.05.24 |
ASP 에서 트래백 내보네기 (0) | 2015.05.23 |
ASP 로 RSS 리더기 구현 (0) | 2015.05.23 |