¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > Recordset - Ä÷º¼Ç

µî·ÏÀÏ : 2017-07-04 17:10 Á¶È¸¼ö : 52,963

Çʵå Ä÷º¼ÇÀÇ ±â´Éµé

¸ÕÀú ¾Æ·¡ÀÇ ¿¹¹®À» º¸ÀÚ...
À̹ø ±Û¿¡¼­´Â °£´ÜÈ÷ Çʵ带 »ç¿ëÇÒ¼ö ÀÖ´Â ¸î°¡ÁöÀÇ ±â´Éµé°ú ¸í·ÉµéÀ» Áý°í ³Ñ¾î°¡±â·Î ÇÕ´Ï´Ù.... ¾Æ¸¶ ¿©·¯ºÐ¿¡°Ô´Â Á» »ý¼ÒÇÏ°Ô
µé¸±Áöµµ ¸ð¸¦ ¸í·ÉµéÀÔ´Ï´Ù... °£´ÜÇϸ鼭µµ ¾îÂ¸é ÇÊ¿äÇÑ ¸í·ÉµéÀÏÅ״ϱî¿ä.
ÀúÀÇ È¨ÆäÀÌÁö°¡ Á¸ÀçÇÏ´Â ÀÌÀ¯°¡ ¾Æ·¡¿Í °°Àº ÆÁµéÀ» ¸ð¾ÆµÑ ¸ñÀûÀ̴ϱî¿ä.

 
<%
        Set Conn=Server.CreateObject("ADODB.Connection")
        Conn.Open("DSN=cak0280;UID=sa;PWD=;database=cak0280")
        
        SQL = "SELECT name,email FROM board ORDER BY ref desc, re_step asc"
        Set rs = Server.CreateObject("ADODB.Recordset")
        
        rs.Open SQL,conn,1
        
        for Each Field in rs.Fields
          response.write Field.name&","
        next
        response.write "<br>"
        do while not rs.eof
          for each field in rs.fields
             response.write field.value&"  "
          next 
          response.write "<br>"
        rs.movenext
        loop  
        
        response.write rs.fields.count
        %>



¸ÕÀú board¶õ Å×ÀÌºí¿¡¼­ name,emailÀ̶õ Çʵ带 °¡Áö°í ¿Í¼­ ·¹ÄÚµå¼Â °´Ã¼¸¦ »ý¼ºÇß´ä´Ï´Ù.
¿ì¸®´Â ¿©±â¿¡¼­ »ç¿ëÇÑ ·¹ÄÚµå¼Â °´Ã¼¸¦ ÀÌ¿ëÇØ ¿©·¯ °¡ÁöÀÇ Á¤º¸¿Í ÀÛ¾÷À» ÇÒ ¼ö ÀÖ´ä´Ï´Ù.
¸ÕÀú Çʵå¸íÀ» Ãâ·ÂÇÏ°í ½ÍÀ»¶© ¾î¶»°Ô ÇØ¾ß ÇÒ±î¿ä?
¾Æ·¡´Â ¼Ò½ºÀÇ ÀϺÎÀÔ´Ï´Ù.

  for Each Field in rs.Fields
        response.write Field.name&","
next

±âÁ¸¿¡ ¿ì¸®´Â ÇʵåÀÇ À̸§À» Á÷Á¢ ÀÔ·ÂÇÏ¿© »ç¿ëÇßÀ» °ÍÀÔ´Ï´Ù..... ±×·¯³ª ¿©±â¿¡¼­´Â ÇʵåÀÇ À̸§ ´ë½Å¿¡
for...next ±¸¹®À» ÀÌ¿ëÇؼ­ ¸ðµç ÇʵåÀÇ À̸§À» ±¸ÇÒ¼ö ÀÖ½À´Ï´Ù. field.nameÀ» »ç¿ëÇؼ­¿ä... °£´ÜÇÏÁÒ?
±×·³ °¢°¢ÀÇ ÇʵåÀÇ ¼Ó¼ºÀ» ±¸ÇÏ°í ½ÍÀ¸¸é ¾î¶»°Ô ÇÏ¸é µÉ±î¿ä??? ÀÌ°Í ¶ÇÇÑ °£´ÜÇÏ´ä´Ï´Ù...
field.name ´ë½Å¿¡ field.type À̶ó°í ÃÄ ³Ö¾î º¸¼¼¿ä.... ±×·³ ±¸ÇÒ¼ö ÀÖ´ä´Ï´Ù.
¾Æ¸¶ Ãâ·ÂÀÌ 200,200 ,,, ½ÄÀ¸·Î Ãâ·ÂÀÌ µÇ°Ú±º¿ä...
¾Æ·¡´Â µ¥ÀÌÅÍ Å¸ÀÔ°ú ±×¿¡ ÇØ´çÇÏ´Â »ó¼ö¸¦ Á¤¸®ÇØ ºÃ´ä´Ï´Ù....
 

  °á°ú°ª

   µ¥ÀÌÅÍ Å¸ÀÔ

20

BigInt

21

UnsignedBigInt

72

GUID

128

Binary

129

Char

130

WChar

131

Numeric

132

UserDefined

133

DBDate

134

DBTime

135

DBTimeStamp

200

Varchar

201

LongVarchar

202

VarWChar

203

LongVarWChar

204

VarBinary

205

LongVarBinary



¿ì¸®°¡ Ãâ·ÂÇÑ °á°ú°¡ 200 À¸·Î ³ª¿Ô´Ù¸é??? Varchar ÇüÀÌ °Ú±º¿ä.. ¸ÂÁÒ???? ^^;
ÀÌÁ¦¿ì¸®´Â do while ±¸¹®À» »ç¿ëÇؼ­ ÇʵåÀÇ ½ÇÁ¦ °á°ú °ªÀ» Ãâ·ÂÇØ¾ß ÇÕ´Ï´Ù..... ¿¡ÀÌ,,, ¹ú½á ´«Ä¡¸¦ ä¼Ì´Ù±¸¿ä???
±×·³,,, ÀÌÁ¦ ¹¹ ÇÒ °ÍÀÌ ¾øÀ» °Í °°±º¿ä.... field.value ÇÏ¹È µË´Ï´Ù¿ä...
±×¸®±¸,,,, ÇöÀç ÇʵåÀÇ °¹¼ö´Â rs.fields.count ÇϹÈ,,,, 2¶ó´Â ¼öÄ¡°¡ Ãâ·ÂµÈ´ä´Ï´Ù... ¾î¶§¿ä?? ÀÌÁ¦ ÈùÆ®¸¦ ÁÖ¾úÀ¸´Ï,
¾ÕÀ¸·Î ÇÁ·Î±×·¡¹ÖÀ» Çϴµ¥,,, ¸¹Àº ÀÀ¿ëÀ» ÇÒ¼ö ÀÖ°ÚÁö¿ä??? ±×·³, ¿À´Ãµµ Áñ°Å¿î ÇÏ·ç µÇ¼¼¿ä..
¸¶Áö¸·À¸·Î ÀúÀÇ È¨¿¡ µé·Á Áּż­ ³Ê¹«³ª °¨»çÇÏ´ä´Ï´Ù.... »õº®À» ¸ÂÀÌÇϸç,,, ¹«´õ¿î ¿©¸§³¯¿¡,,,,
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.