DSO(data source object)·ÎºÎÅÍ ÁöÁ¤µÈ À̸§ÀÇ µ¥ÀÌÅÍ ±¸¼º¿ø¿¡ ÇØ´çÇÏ´Â ·¹Äڵ弼Ʈ(recordset) °³Ã¼¸¦ ¹ÝȯÇÑ´Ù.
¹Ýȯ°ª oItemÀº ¼º°øÀûÀÌ¸é ¸®Äڵ弼Ʈ¸¦ ¹ÝȯÇÏ°í, ÁöÁ¤µÈ µ¥ÀÌÅÍ ±¸¼º¿øÀ̳ª ÇϺΠéÅÍ°¡ ¾ø¾î ½ÇÆÐÇϸé nullÀ» ¹ÝȯÇÑ´Ù.
µ¥ÀÌÅÍ ±¸¼º¿øÀÇ À¯È¿ÇÑ À̸§Àº DSO(data source object) Àû¿ë¿¡ ¸Â´Â À̸§À̾î¾ß ÇÑ´Ù.
null °ªÀ̳ª ºó ¹®ÀÚ¿À» namedRecordset ¸Þ¼µå¿¡ Àü´ÞÇϸé, µðÆúÆ® ¸®Äڵ弼Ʈ°¡ ¹ÝȯµÈ´Ù. ÀÌ´Â recordset ¼Ó¼ºÀ» ÀÛÁ¢ÀûÀ¸·Î ÂüÁ¶ÇÏ´Â °Í°ú µ¿ÀÏÇÏ´Ù..
µÎ¹ø° ÆĶó¸ÞÅÍ°¡ »ý·«µÇ¸é, ÃÖ»óÀ§ ¸®Äڵ弼Ʈ°¡ ¹ÝȯµÈ´Ù. óÀ½ ÆĶó¸ÞÅÍ°¡ »ý·«µÇ°í, µÎ¹ø° ÆĶó¸ÞÅÍ°¡ ÁöÁ¤µÇ¸é, µðÆúÆ® ¸®Äڵ弼ƮÀÇ ÁöÁ¤µÈ ÇϺΠéÅÍ(subchapter)°¡ ¹ÝȯµÈ´Ù.
°³Ã¼ | script | IE |
---|
À̸§ÀÖ´Â ¸®Äڵ弼Ʈ´Â ½ºÇÁ·¹µå½¬Æ® ù Ä÷³¿¡¼ Á¦ÀÏ ¸ÕÀú 7 Ä¿¡ ÇØ´çÇÑ´Ù. namedRecordset ¸Þ¼µå¸¦ »ç¿ëÇÏ¿© ½ºÇÁ·¹µå½¬Æ®·Î ºÎÅÍ µ¥ÀÌÅ͸¦ Á¦°øÇÏ´Â °¡Á¤ÀûÀÎ DSOÀÇ ondatasetcomplete À̺¥Æ®ÀÇ Ã³¸®ÀÚ¿¡¼ À̸§ÀÖ´Â ¸®Äڵ弼Ʈ·ÎºÎÅÍ ¹Ýȯ¹Þ´Â´Ù. ¸®Äڵ弼ƮÀÇ À̸§Àº event °³Ã¼ÀÇ qualifier ¼Ó¼º°ª¿¡ ÇØ´çÇÑ´Ù. ¿¹Á¦ÀÇ classid´Â ÀÛ¿ëÇÏÁö ¾Ê´Â´Ù.
<SCRIPT> function handle_dscomplete(){ // ¸ðµç µ¥ÀÌÅÍ°¡ ÁغñµÇ¸é ¹ß»ýµÈ´Ù. var oEvent=window.event; if (oEvent.qualifier !=''){ // µðÆúÆ® ¸®Äڵ弼ƮÀÇ Å뺸´Â ¹«½ÃµÈ´Ù. var oNamedRS=oEvent.srcElement.namedRecordset(oEvent.qualifier); // qualifier ¼Ó¼ºÀ¸·Î ÁöÁ¤µÈ À̸§ÀÖ´Â ¸®Äڵ弼Ʈ¸¦ ÂüÁ¶ oNamedRS.MoveFirst(); // À̸§ÀÖ´Â ¸®Äڵ弼Ʈ¿¡¼ ÀÛ¾÷ for (i=0;i< oNamedRS.RecordCount;i++){ var vValue=oNamedRS.Fields(0).value; oNamedRS.MoveNext(); } } } </SCRIPT> <OBJECT classid="clsid:00000000-0000-0000-0000-000000000000" id="dsoSpreadSheet" ondatasetcomplete="handle_dscomplete()"> </OBJECT> <TABLE datasrc="#dsoSpreadsheet.A1:A7" border=1> <TR><TD><SPAN datafld="A"></SPAN></TD></TR> </TABLE>