|
|
|
|
±è¹Î¼® / 2000-02-09 / ¿ÀÈÄ 6:13:11 / 203.253.213.254
Á¶È¸¼ö : 111
|
[Áú¹®] ³ªµµ ¼º°øÇÏ°í ½ÃÆ÷¶ó... |
俵´ÔÀÇ °Ô½ÃÆÇ, Ä«¿îÅ͸¦ board¶ó´Â
DB¿¡ System DSN µµ board¶ó°í ÁöÁ¤Çؼ
¾²°í ÀÖ½À´Ï´Ù.
±Ùµ¥ ±× DB¿¡ digitalÀ̶ó´Â Å×À̺íÀ» ¸¸µé¾ú¾î¿ä..
±×¸®°í, ±× Å×ÀÌºí¿¡ ±ÛÀ» ¾µ·Á°í
´Ù¸¥ ¼Ò½º¸¦ ÂüÁ¶ Çؽáµç¿ä...(俵´Ô ¼Ò½º´Â ³Ê¹« º¹ÀâÇؼ¸®)
digital À̶ó´Â Å×À̺íÀº ¾î¶»°Ô µÇ¾î ÀÖ³Ä Çϸé¿ä..
no int, // ±Û¹øÈ£
title1 varchar(80), // Å«Á¦¸ñ
title2 varchar(80), // ÀÛÀºÁ¦¸ñ
content text // ³»¿ë
¿ä·¸°Ô µÇ¾î ÀÖ±¸¿ä...
±ÛÀ» ¾²·Á°í write.asp¸¦ ÀÌ·¸°Ô ½è¾î¿ä...
-----------------------------------------------
<%@ language=VBScript %>
<%
'IsWrite°¡ TRUEÀ̸é (ÀÌ°ÍÀÌ TRUE·Î µÇ´Â ÁöÁ¡Àº ¾Æ·¡ Form¿¡¼ 'Save'¹öÆ°À» ´©¸¦¶§ÀÌ´Ù.)
if request("IsWrite") = "TRUE" then
'ÀÏ´Ü ÀÔ·ÂµÈ °Ô½Ã±ÛÀÇ ÃÖ´ë ¹øÈ£¸¦ ¾ò°í
maxid = 0
maxSQL = " SELECT max(no) from digital "
set maxRST = Session("DBConnection_ConnectionString").Execute(maxSQL)
if maxRST(0) > 0 then maxid = maxRST(0) end if
maxRST.close
set maxRST = nothing
'¾òÀº °Ô½Ã±ÛÀÇ ÃÖ´ë ¹øÈ£¿¡ Çϳª¸¦ ´õÇØ °Ô½Ã±ÛÀ» Database¿¡ ÀúÀåÇÑ´Ù.
maxid = maxid + 1
writeSQL = "INSERT INTO digital (no,title1,title2,content) values (" _
& " " & maxid & " ," _
& "'" & Replace(request("title1"),"'","''") & "'," _
& "'" & Replace(request("title2"),"'","''") & "'," _
& "'" & Replace(request("content"),"'","''") & "' " _
& ")"
set writeRST = Session("DBConnection_ConnectionString").Execute(writeSQL)
set writeRST = nothing
%>
°¨»çÇÕ´Ï´Ù.
±Û µî·ÏÀÌ Àß ÀÌ·ç¾îÁ³À¾´Ï´Ù.
µî·ÏµÈ ÀÚ·á´Â ´ÙÀ½°ú °°À¾´Ï´Ù.
¹øÈ£ : | <%=maxid%> |
---|
Å«Á¦¸ñ : | <%=request("title1")%> |
---|
¼ÒÁ¦¸ñ : | <%=request("title2")%> |
---|
³»¿ë : | <%=Replace(request("content"),chr(10)," ")%> |
---|
<%
else
%>
°Ô½ÃÆÇ µî·Ï
°Ô½ÃÆÇ µî·Ï
<%
end if
%>
------------------------------------------------
俵´ÔÀÇ global.asa¿Í ÀÌ ¼Ò½º¿ÍÀÇ °ü°è¿¡ ¹®Á¦ Á¡¿¡ °üÇØ ¼³¸íÇØÁֽøé Á¤¸» °¨»çÇÏ°Ú½À´Ï´Ù.^^
¾îÈÞ..»·»·½º·¯¿ö¶ó...
|
|
|
|