SAK }‘ŠÙ

SAK Streets ƒƒCƒ“ƒXƒgƒŠ[ƒg }‘ŠÙEƒJƒtƒF ˆê—— SAK Streets ŒŸõ
| VB | SQL | Perl | PHP | ASP | JSP | C | PC | HP | FAQ | ƒtƒŠ[ƒ\ƒtƒg |

ASP VB Script Šî‘bŽÀ’n•Ò3 - ƒf[ƒ^ƒx[ƒXŽQÆAƒe[ƒuƒ‹Aƒtƒ‰ƒbƒgƒe[ƒuƒ‹

¡ƒf[ƒ^ƒx[ƒXŽQÆ - ƒe[ƒuƒ‹•\Ž¦

  Eƒe[ƒuƒ‹‚ðŽg—p‚µ‚ÄAãY—í‚É•\Ž¦‚·‚é‚É‚ÍAŽŸ‚̂悤‚É‚µ‚Ü‚·B
    <TABLE rules=ALL> ‚ÆAurules=ALLv‚ðŽg‚¤‚Ì‚ªƒ~ƒ\‚Å‚ ‚éB
    urules=ALLv‚ÅA€–Ú‚ª NULL ‚Ì‚Æ‚«‚Å‚àãY—í‚É•\Ž¦‚Å‚«‚éB
    <TD align=right> ‚ÍA”’l€–Ú‚ð‰E‹l‚ß‚·‚é‚Ì‚ÉŽw’肵‚Ä‚¢‚éB

<%@ Language=VBScript %>
<%
  const title = "ƒf[ƒ^ƒx[ƒXŽQÆ"
  const dsn   = "dsn=SAK3_ADO;uid=SAK;pwd=SAK"
  const dcr   = 3  '** adUseClient
  const dbi   = "*"
  const dbf   = "sak.ƒeƒXƒgm"
  const dbw   = ""  '** where ƒL[ like 'a%'
  const dbo   = "order by ƒL["
  dim sql, rs, i, s

'** ƒf[ƒ^ƒx[ƒXÚ‘±
  if isempty(session("s3cn_ado")) then
    set session("s3cn_ado") = server.CreateObject ("ADODB.Connection")
    session("s3cn_ado").Open dsn
    session("s3cn_ado").CursorLocation = dcr
  end if

'** ƒNƒGƒŠ”­s
  sql = "select " & dbi & " from " & dbf & " " & dbw & " " & dbo
  set rs = session("s3cn_ado").Execute(sql)
%>
<HTML>
<HEAD>
<TITLE><% = title %></TITLE>
</HEAD>
<BODY>
<%
'** ƒf[ƒ^ƒŠƒXƒgƒAƒbƒv
  response.write("<P>")
  response.write("<TABLE rules=ALL><TBODY>")
  response.write("<TR>")
  response.write("<TD>ƒŠƒXƒg”Ô†</TD>")
  response.write("<TD>ƒL[</TD>")
  response.write("<TD>ƒf[ƒ^1</TD>")
  response.write("<TD>ƒf[ƒ^2</TD>")
  response.write("<TD>ƒf[ƒ^3</TD>")
  response.write("</TR>")
  i = 0
  do until rs.eof
    i = i + 1
    s = right("000000" & i, 6)
    response.write("<TR>")
    response.write("<TD>" & s & "</TD>")
    response.write("<TD>" & rs("ƒL[") & "</TD>")
    response.write("<TD align=right>" & rs("ƒf[ƒ^1") & "</TD>")
    response.write("<TD align=right>" & rs("ƒf[ƒ^2") & "</TD>")
    response.write("<TD align=right>" & rs("ƒf[ƒ^3") & "</TD>")
    response.write("</TR>")
    rs.movenext
  loop
  response.write("</TBODY></TABLE>")
  response.write("</P>")

'** ƒŒƒR[ƒhƒZƒbƒgƒNƒ[ƒY
  rs.close
%>
</BODY>
</HTML>

¡ƒf[ƒ^ƒx[ƒXŽQÆ - ƒtƒ‰ƒbƒgƒe[ƒuƒ‹•\Ž¦

  Eƒe[ƒuƒ‹‚ðƒtƒ‰ƒbƒg•\Ž¦‚·‚éꇂÍAŽŸ‚̂悤‚É‚µ‚Ü‚·B

<%@ Language=VBScript %>
<%
  const title = "ƒf[ƒ^ƒx[ƒXŽQÆ"
  const dsn   = "dsn=SAK3_ADO;uid=SAK;pwd=SAK"
  const dcr   = 3  '** adUseClient
  const dbi   = "*"
  const dbf   = "sak.ƒeƒXƒgm"
  const dbw   = ""  '** where ƒL[ like 'a%'
  const dbo   = "order by ƒL["
  dim sql, rs, i, s

'** ƒf[ƒ^ƒx[ƒXÚ‘±
  if isempty(session("s3cn_ado")) then
    set session("s3cn_ado") = server.CreateObject ("ADODB.Connection")
    session("s3cn_ado").Open dsn
    session("s3cn_ado").CursorLocation = dcr
  end if

'** ƒNƒGƒŠ”­s
  sql = "select " & dbi & " from " & dbf & " " & dbw & " " & dbo
  set rs = session("s3cn_ado").Execute(sql)
%>
<HTML>
<HEAD>
<TITLE><% = title %></TITLE>
</HEAD>
<BODY>
<%
'** ƒf[ƒ^ƒŠƒXƒgƒAƒbƒv
  response.write("<P>")
  response.write("<TABLE rules=ALL bgcolor=#b0b0b0 border=0 cellPadding=3 cellSpacing=2><TBODY>")
  response.write("<TR bgcolor=#d0d0d0>")
  response.write("<TD>ƒŠƒXƒg”Ô†</TD>")
  response.write("<TD>ƒL[</TD>")
  response.write("<TD>ƒf[ƒ^1</TD>")
  response.write("<TD>ƒf[ƒ^2</TD>")
  response.write("<TD>ƒf[ƒ^3</TD>")
  response.write("</TR>")
  i = 0
  do until rs.eof
    i = i + 1
    s = right("000000" & i, 6)
    response.write("<TR bgcolor=#f0f0f0>")
    response.write("<TD>" & s & "</TD>")
    response.write("<TD>" & rs("ƒL[") & "</TD>")
    response.write("<TD align=right>" & rs("ƒf[ƒ^1") & "</TD>")
    response.write("<TD align=right>" & rs("ƒf[ƒ^2") & "</TD>")
    response.write("<TD align=right>" & rs("ƒf[ƒ^3") & "</TD>")
    response.write("</TR>")
    rs.movenext
  loop
  response.write("</TBODY></TABLE>")
  response.write("</P>")

'** ƒŒƒR[ƒhƒZƒbƒgƒNƒ[ƒY
  rs.close
%>
</BODY>
</HTML>

¡ASP VB Script Šî‘bŽÀ’n•ÒŽ‘—¿
¡ASP VB Script Šî‘b•ÒŽ‘—¿
¡ASP VB Script ADO + SQL ‰ž—p•ÒŽ‘—¿
¡ASP VB Script oo4o + SQL ‰ž—p•ÒŽ‘—¿
¡SQL Šî‘b•ÒŽ‘—¿
¡SQL Šî‘bŽÀ’n•ÒŽ‘—¿
¡SQL ƒ`ƒ…[ƒjƒ“ƒO•ÒŽ‘—¿
¡Oracle PL/SQL •ÒŽ‘—¿
¡PostgreSQL •ÒAJAVA ServletAJSP •ÒŽ‘—¿
¡MySQL •ÒŽ‘—¿
| VB | SQL | Perl | PHP | ASP | JSP | C | PC | HP | FAQ | ƒtƒŠ[ƒ\ƒtƒg |

SAK Streets ƒƒCƒ“ƒXƒgƒŠ[ƒg }‘ŠÙEƒJƒtƒF ˆê—— SAK Streets ŒŸõ



Copyright (C) 1999-2024 Y.SAK