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 |

PostgreSQL + ASP ADO •Ō1 - ODBC ƒhƒ‰ƒCƒoAƒŒƒR[ƒhXVAƒŒƒR[ƒhŽQÆ

ĄPostgreSQL ODBC ƒhƒ‰ƒCƒoƒCƒ“ƒXƒg[ƒ‹

  EVB ‚Æ‹Ī’Ę‚Å‚ ‚éB

ĄPostgreSQL ODBC ƒVƒXƒeƒ€ DSN Ý’č

  EVB ‚Æ‹Ī’Ę‚Å‚ ‚éB

ĄPostgreSQL ODBC + ASP VB Script ADO ƒe[ƒuƒ‹ėŽ

  Eƒe[ƒuƒ‹ėŽ‚ŁA“ú–{Œę€–Ú–ž‚ŠŽw’č‚Å‚Ŧ‚é‚ĐƒeƒXƒg‚·‚éB
    –â‘č‚Č‚­ėŽ‚Å‚Ŧ‚éB

<%@ Language=VBScript %>
<%
  Const title = "PostgreSQL ODBC + ASP VB Script ADO ƒe[ƒuƒ‹ėŽ"
  Dim cn
  Dim sql

'** ODBC Ú‘ą
  set cn = Server.CreateObject ("ADODB.Connection")
  cn.Open "dsn=PostgreSQL;uid=sak;pwd=sak"
  cn.CursorLocation = 3

'** ƒe[ƒuƒ‹ėŽ
  sql = "create table testm ("
  sql = sql & "ƒL[ char(008),"
  sql = sql & "ƒf[ƒ^1 int8,"
  sql = sql & "ƒf[ƒ^2 int8,"
  sql = sql & "ƒf[ƒ^3 int8"
  sql = sql & ")"
  cn.Execute sql

'** ODBC Ú‘ą‰ðœ
  cn.Close
%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<TITLE><% = title %></TITLE>
</HEAD>
<BODY>
<P><% = title %></P>
<P><% = sql %></P>
<P>ˆ—I—đ</P>
</BODY>
</HTML>

ĄPostgreSQL ODBC + ASP VB Script ADO ƒŒƒR[ƒhXV

  EƒŒƒR[ƒh’Į‰Á‚ŁA“ú–{Œęƒf[ƒ^‚ŠŽw’č‚Å‚Ŧ‚é‚ĐƒeƒXƒg‚·‚éB
    –â‘č‚Č‚­’Į‰Á‚Å‚Ŧ‚éB

<%@ Language=VBScript %>
<%
  Const title = "PostgreSQL ODBC + ASP VB Script ADO ƒŒƒR[ƒhXV"
  Dim cn

'** ODBC Ú‘ą
  set cn = Server.CreateObject ("ADODB.Connection")
  cn.Open "dsn=PostgreSQL;uid=sak;pwd=sak"
  cn.CursorLocation = 3

'** ƒgƒ‰ƒ“ƒUƒNƒVƒ‡ƒ“ŠJŽn
  cn.BeginTrans

'** ƒŒƒR[ƒhˆ—
  cn.Execute "insert into testm values ('x001', 1, 2, 3)"
  cn.Execute "insert into testm values ('x002', 10, 20, 30)"
  cn.Execute "insert into testm values ('“ú–{Œę', 1, 2, 3)"
  cn.Execute "insert into testm values ('‚Đ‚ņ‚ķ', 10, 20, 30)"

'** ƒgƒ‰ƒ“ƒUƒNƒVƒ‡ƒ“I—đ
  cn.CommitTrans

'** ODBC Ú‘ą‰ðœ
  cn.Close
%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<TITLE><% = title %></TITLE>
</HEAD>
<BODY>
<P><% = title %></P>
<P>ˆ—I—đ</P>
</BODY>
</HTML>

ĄPostgreSQL ODBC + ASP VB Script ADO ƒŒƒR[ƒhŽQÆ

  EƒŒƒR[ƒhŽQÆ‚ŁA“ú–{Œę€–ځA“ú–{Œęƒf[ƒ^‚ŠŽQÆ‚Å‚Ŧ‚é‚ĐƒeƒXƒg‚·‚éB
    –â‘č‚Č‚­ŽQÆ‚Å‚Ŧ‚éB

<%@ Language=VBScript %>
<%
  Const title = "PostgreSQL ODBC + ASP VB Script ADO ƒŒƒR[ƒhŽQÆ"
  Dim cn
  Dim rs
%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<TITLE><% = title %></TITLE>
</HEAD>
<BODY>
<P><% = title %></P>
<%
'** ODBC Ú‘ą
  set cn = Server.CreateObject ("ADODB.Connection")
  cn.Open "dsn=PostgreSQL;uid=sak;pwd=sak"
  cn.CursorLocation = 3

'** ƒŒƒR[ƒhƒZƒbƒgƒI[ƒvƒ“
  set rs = cn.Execute("select * from testm")

'** ƒŒƒR[ƒhˆ—
  response.write(rs("ƒL[").name & "<BR>")
  response.write("-------------<BR>")
  do until rs.EOF
    response.write(rs("ƒL[") & "<BR>")
    rs.MoveNext
  loop
  response.write("-------------<BR>")

'** ƒŒƒR[ƒhƒZƒbƒgƒNƒ[ƒY
  rs.Close

'** ODBC Ú‘ą‰ðœ
  cn.Close
%>
<P>ˆ—I—đ</P>
</BODY>
</HTML>

Ą‚ŧ‚Ė‘ž ADO ‘€ė

  ESQL ‚É‘―­‚Ėˆá‚Ē‚Í‚ ‚Á‚Ä‚āAADO ‚ŧ‚Ė‚ā‚Ė‚Ė‘€ė‚Í Oracle ‚Æ•Ï‚í‚į‚Č‚ĒB
    wVB ADO + SQL ‰ž—p•ŌxAwASP VB Script ADO + SQL ‰ž—p•Ōx
    ‚ðŽQl‚É‚ĩ‚ĉš‚ģ‚ĒB

ĄPostgreSQL •ŌAJAVA ServletAJSP •ŌŽ‘—ŋ
ĄMySQL •ŌŽ‘—ŋ
ĄSQL Šî‘b•ŌŽ‘—ŋ
ĄSQL Šî‘bŽĀ’n•ŌŽ‘—ŋ
ĄSQL ƒ`ƒ…[ƒjƒ“ƒO•ŌŽ‘—ŋ
ĄOracle PL/SQL •ŌŽ‘—ŋ
| 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