'insert'에 해당되는 글 1건

  1. 2013.10.31 [ASP] DB 예제 - Insert 삽입 추가
asp2013. 10. 31. 10:05

<%
 id = "pluto"
 name = "유호인"
 sex = "남"
 age = 26
 email = "
pluto@A.com"

 Set dbCon = Server.CreateObject("ADODB.Connection")
 strConnect = "DSN=MyFriendODBC;uid=student;pwd=wjdqh12;STMT=set names euckr;"
 dbCon.Open strConnect

 SQL = " INSERT INTO MyFriend(m_id, m_name, m_sex, m_age, m_joinday, m_email) VALUES "
 SQL = SQL & "('" & id & "'"
 SQL = SQL & ",'" & name & "'"
 SQL = SQL & ",'" & sex & "'"
 SQL = SQL & ",'" & age & "'"
 SQL = SQL & ",now()"
 SQL = SQL & ",'" & email & "')"
 
 dbCon.Execute SQL


%>

<html>
 <head>
  <title>ADO - INSERT </title>
 </head>

 <body>
  
 </body>
</html>

출처 :  http://sugame.tistory.com/222

 

Posted by 광포한곰돌이