|
|
|
|
±è¹Î¼® / 2000-02-10 / ¿ÀÀü 8:50:51 / 203.253.213.101
Á¶È¸¼ö : 101
|
[Áú¹®] [±Â ¸ð´× Áú¹®]auto increment?x) |
Å×À̺íÀÇ Ç׸ñÁß¿¡ no¶ó´Â °íÀ¯ ¹øÈ£¸¦ Àû¾îÁÖ´Â Ç׸ñÀÌ ÀÖ½À´Ï´Ù.
SQL¿¡¼ Å×ÀÌºí µðÀÚÀÎ ÇÒ¶§ ÀÚµ¿À¸·Î µ¥ÀÌŸ°¡ ÀԷµɶ§¸¶´Ù ÀÌ ¼ýÀÚ¸¦ 1¾¿ Áõ°¡ ½ÃÄÑÁÖ´Â ¼Ó¼ºÀÌ ÀÖ´ÂÁö¿ä...?
±×°Ô ÀÖÀ»°Í °°Àºµ¥ ¸ô¶ó¼ ¿ì¼± ASP¿¡¼ ÀÌ·¸°Ô Çغðŵç¿ä....
------------------------------------------------
title1 = Request.Form("title1")
title2 = Request.Form("title2")
content=Replace(Request.Form("content"), "'", "''")
Set DbCon = Server.CreateObject("ADODB.Connection")
DbCon.Open("DSN=board;UID=sa;PWD=")
strSql = " SELECT * FROM digital "
Set rsList = DbCon.Execute(strSql)
no= rsList("no")+1 <-¿ä±â!!
strSql = " INSERT INTO digital "
strSql = strSql & " ( no, title1,title2,content ) "
strSql = strSql & " VALUES "
strSql = strSql & " ( '" & no & "' ,'"
strSql = strSql & title1 & "' ,'"
strSql = strSql & title2 & "' ,'"
strSql = strSql & content & "' ) "
DbCon.Execute(strSql)
------------------------------------------------
ÀÌ·¸°Ô Çß´õ´Ï óÀ½¸¸ 1ÀÌ ´õÇØÁö°í °è¼Ó 1À̳׿ä..^^
|
|
|
|