Title: JSP ???????
1?????????????????????????????
Data Selecting by ASP
??????????????? ???????????? ?????????????????????
?????????????? http//www.yonok.ac.th
?.???????? ??????????? . ???????? 23 ????????
2550
2DSNLess !recordset (1/5)
lt set c server.createobject("adodb.connection"
) c "drivermicrosoft access driver (.mdb)
" c c "dbq" server.mappath("dthai97.mdb") s
ql "select from tbthai" set rs
c.execute(sql) do while not rs.eof
response.write(rs("fid") "ltbrgt") rs.MoveNext
loop c.close set rs nothing set c
nothing gt
?????????????????? http//www.thaiabc.com/asp/dtha
i97.mdb
3DSNLess recordset (2/5)
lt set rs server.createobject("adodb.recordset"
) c "drivermicrosoft access driver (.mdb)
" c c "dbq" server.mappath("dthai97.mdb") s
ql "select from tbthai" rs.open sql, c, 1, 3
response.write(rs.recordcount "ltbrgt") do
while not rs.eof response.write(rs("fid")"ltbrgt
") rs.MoveNext loop rs.close gt
4OLEDB Provider (3/5)
lt set c server.createobject("adodb.connection"
) c.open "providermicrosoft.jet.oledb.4.0 data
source" server.mappath("dthai97.mdb") sql
"select from tbthai" set rs c.execute(sql)
do while not rs.eof response.write(rs("fid")
"ltbrgt") rs.MoveNext loop c.close set rs
nothing set c nothing gt
5DSN (Data Source Name) !Recordset (4/5)
lt set c server.createobject("adodb.connection"
) c.open "xdthai97","","" sql "select from
tbthai" set rs c.execute(sql) do while not
rs.eof response.write(rs("fid") "ltbrgt")
rs.MoveNext loop c.close set rs nothing set
c nothing gt
6DSN (Data Source Name) Recordset (5/5)
lt set c server.createobject("adodb.connection"
) c.open "xdthai97","","" set rs
server.createobject("adodb.recordset") sql
"select from tbthai" rs.open sql, conn, 1,
3 response.write(rs.recordcount "ltbrgt") do
while not rs.eof response.write(rs("fid")
"ltbrgt") rs.MoveNext loop c.close set rs
nothing set c nothing gt