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> ‚ƁAurules=ALLv‚ðŽg‚¤‚Ì‚ªƒ~ƒ\‚Å‚ ‚éB
    urules=ALLv‚Ł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 ServletAJSP •ÒŽ‘—¿
¡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-2017 Y.SAK