ASP.NET
database
3-Tier Layers of Database System
- presentation layer: user interface
- application layer: web server(
IIS
) data
layer: database server
API Interface Standards for DB Access
DBMS에 접근하기 위한 표준 API
ODBC
Open Database Connectivity
DBMS-independent APIJDBC
: Java Database Connectivity
<a target="_blank">
ASP (Active Server Pages)
server side scripting(VBScript
) language
CGI: <% %>는 server에서 실행되는 코드
ASP 데이터베이스 연동
<%
Dim conn, connCmd, rs
Set connCmd = "DSN=dsn_name; Database=dbname; UID=user;PWD=password"
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.Open connCmd
rs.Open "SELECT * FROM table_name", conn
%>
<%
rs.getRows()
conn.Execute SQL %>
오류 메세지 한글 설정
<meta charset="UTF-8">
<%
Session.CodePage = 949
Response.CharSet = "euc-kr"
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1 %>
form tag 한글 깨짐 문제
<%
Session.CodePage="65001"
Response.CharSet="UTF-8" %>