제목 : 06.CREATE명령실행하기(Table생성).aspx
<%@ Import NameSpace="System.Data" %>
<%@ Import NameSpace="System.Data.SqlClient" %>
<%
Dim objConnection As SqlConnection
Dim objCommand As SqlCommand
Dim strQuery As String
objConnection = New SqlConnection("server=localhost;uid=sa;pwd=;database=ADOdotNET")
objConnection.Open()
strQuery = "Create Table ADOdotNET" & _
"(" & _
"name varchar(25)" & _
")"
objCommand = New SqlCommand(strQuery, objConnection)
objCommand.ExecuteNonQuery()
objConnection.Close()
%>
<center>ADOdotNET 테이블이 생성되었습니다.</center>