<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>サンプルコードで学ぶASP &#187; Sessionオブジェクト</title>
	<atom:link href="http://asp.verygoodtown.com/category/reference/asp-object/session-object/feed" rel="self" type="application/rss+xml" />
	<link>http://asp.verygoodtown.com</link>
	<description>レガシーなASPの使い方をコード付きで紹介します。</description>
	<lastBuildDate>Tue, 13 Apr 2010 02:25:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Session_OnStart</title>
		<link>http://asp.verygoodtown.com/2009/08/session_onstart</link>
		<comments>http://asp.verygoodtown.com/2009/08/session_onstart#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:52:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=394</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Session_OnStart &#8212; サーバーが新しいセッションを作成したときに発生します。
Sub Session_OnStart
. . .
End Sub
説明
このスクリプトは、要求されたページの実行前に処理されます。したがって、Session_OnStart イベントは、セッション全体の変数を設定するタイミングとして適しています。変数は、ページへのアクセスが始まる前に設定されるためです。 Session_OnStart イベント スクリプトでは、すべての組み込みオブジェクト (Application、 ObjectContext、 Request、Response、Server、および Session) が利用でき、参照できます。
Session_OnStart イベントに Redirect メソッドまたは End メソッドの呼び出しが含まれている場合も、Session オブジェクトは処理されますが、サーバーは Global.asa ファイルのスクリプト、および Session_OnStart イベントを発生させたファイルのスクリプトの処理を停止します。
Session_OnStart イベントで Redirect メソッドを呼び出し、ユーザーが常に特定の Web ページでセッションを始めるようにする処理などを行うことができます。ユーザーがアプリケーションに入ると、サーバーはそのユーザーに対してセッションを作成し、Session_OnStart イベントスクリプトを処理します。このイベントのスクリプトでは、ユーザーが開いたページが開始ページかどうかを調べ、開始ページではない場合に Response.Redirect メソッドを呼び出してユーザーを開始ページに移動させることができます。次の例は、以上の内容を示しています。
例1.Session_OnStartの例
1234567891011&#60;script RUNAT=Server LANGUAGE=VBScript&#62;
Sub Session_OnStart

&#160; startPage = &#34;/MyApp/StartHere.asp&#34;
&#160; currentPage = Request.ServerVariables(&#34;SCRIPT_NAME&#34;)

&#160; If strcomp(currentPage,startPage,1) then
&#160; &#160; Response.Redirect(startPage)
&#160; End If
End Sub
&#60;/script&#62;
上の例は、cookie をサポートしているブラウザでのみ動作します。非 cookie [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Session_OnStart &#8212; サーバーが新しいセッションを作成したときに発生します。</p>
<p><strong>Sub Session_OnStart</strong><br />
. . .<br />
<strong>End Sub</strong></p>
<h3>説明</h3>
<p>このスクリプトは、要求されたページの実行前に処理されます。したがって、Session_OnStart イベントは、セッション全体の変数を設定するタイミングとして適しています。変数は、ページへのアクセスが始まる前に設定されるためです。 Session_OnStart イベント スクリプトでは、すべての組み込みオブジェクト (Application、 ObjectContext、 Request、Response、Server、および Session) が利用でき、参照できます。</p>
<p>Session_OnStart イベントに Redirect メソッドまたは End メソッドの呼び出しが含まれている場合も、Session オブジェクトは処理されますが、サーバーは Global.asa ファイルのスクリプト、および Session_OnStart イベントを発生させたファイルのスクリプトの処理を停止します。</p>
<p>Session_OnStart イベントで Redirect メソッドを呼び出し、ユーザーが常に特定の Web ページでセッションを始めるようにする処理などを行うことができます。ユーザーがアプリケーションに入ると、サーバーはそのユーザーに対してセッションを作成し、Session_OnStart イベントスクリプトを処理します。このイベントのスクリプトでは、ユーザーが開いたページが開始ページかどうかを調べ、開始ページではない場合に Response.Redirect メソッドを呼び出してユーザーを開始ページに移動させることができます。次の例は、以上の内容を示しています。</p>
<p>例1.Session_OnStartの例</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;script RUNAT=Server LANGUAGE=VBScript&gt;<br />
<span style="color: #000080;">Sub</span> Session_OnStart<br />
<br />
&nbsp; startPage = <span style="color: #800000;">&quot;/MyApp/StartHere.asp&quot;</span><br />
&nbsp; currentPage = Request.ServerVariables(<span style="color: #800000;">&quot;SCRIPT_NAME&quot;</span>)<br />
<br />
&nbsp; <span style="color: #000080;">If</span> strcomp(currentPage,startPage,1) <span style="color: #000080;">then</span><br />
&nbsp; &nbsp; Response.Redirect(startPage)<br />
&nbsp; <span style="color: #000080;">End</span> <span style="color: #000080;">If</span><br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span><br />
&lt;/script&gt;</div></td></tr></tbody></table></div>
<p>上の例は、cookie をサポートしているブラウザでのみ動作します。非 cookie ブラウザは SessionID cookie を返さないため、ユーザーがページを要求するたびにサーバーは新しいセッションを作成します。したがって、要求ごとにサーバーは Session_OnStart スクリプトを処理し、ユーザーを開始ページに移動させます。上記のスクリプトを使う場合、そのサイトの開始ページには、cookie が利用可能なブラウザの使用が必要なことをユーザーに知らせるメッセージを掲示することをお勧めします。</p>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/session_onstart/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session_OnEnd</title>
		<link>http://asp.verygoodtown.com/2009/08/session_onend</link>
		<comments>http://asp.verygoodtown.com/2009/08/session_onend#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:52:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=392</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Session_OnEnd &#8212; セッションが破棄されたときに発生
Sub Session_OnEnd
. . .
End Sub
説明
Session_OnEnd イベントは、セッションが破棄されたとき、またはタイムアウトになったときに発生します。サーバー組み込みオブジェクトのうち、Application オブジェクト、Server オブジェクト、および Session オブジェクトだけが利用できます。
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Session_OnEnd &#8212; セッションが破棄されたときに発生</p>
<p><strong>Sub Session_OnEnd</strong><br />
. . .<br />
<strong>End Sub</strong></p>
<h3>説明</h3>
<p>Session_OnEnd イベントは、セッションが破棄されたとき、またはタイムアウトになったときに発生します。サーバー組み込みオブジェクトのうち、Application オブジェクト、Server オブジェクト、および Session オブジェクトだけが利用できます。</p>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/session_onend/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RemoveAll</title>
		<link>http://asp.verygoodtown.com/2009/08/removeall-2</link>
		<comments>http://asp.verygoodtown.com/2009/08/removeall-2#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:50:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=390</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
RemoveAll &#8212; Contents コレクションからすべての項目を削除します。
Session.Contents.RemoveAll( )
説明
RemoveAll メソッドは、Session オブジェクトの Contents コレクションに追加された項目すべてを削除します。
次の例は、Session.contents コレクションに追加された項目すべてを削除します。
例1.RemoveAllの例
1&#60;%Session.Contents.RemoveAll()%&#62;
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
RemoveAll &#8212; Contents コレクションからすべての項目を削除します。</p>
<p><strong>Session.Contents.RemoveAll</strong>( )</p>
<h3>説明</h3>
<p>RemoveAll メソッドは、Session オブジェクトの Contents コレクションに追加された項目すべてを削除します。</p>
<p>次の例は、Session.contents コレクションに追加された項目すべてを削除します。</p>
<p>例1.RemoveAllの例</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;%Session.Contents.RemoveAll()%&gt;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/removeall-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove</title>
		<link>http://asp.verygoodtown.com/2009/08/remove-2</link>
		<comments>http://asp.verygoodtown.com/2009/08/remove-2#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:45:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=386</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Remove &#8212; Contents コレクションから項目を削除します。
Session.Contents.Remove( Item&#124;Index )


パラメータ 	 



Item 	
コレクションから削除するメンバの名前です。


Index
コレクションから削除するメンバのインデックス エントリです。


説明
Contents.Remove メソッドは、入力パラメータとして文字列または整数のいずれかの値をとります。入力パラメータが文字列の場合、メソッドは Contents コレクション内で名前が文字列と一致する項目を探し、削除します。入力パラメータが整数の場合、メソッドはコレクションの最初から数えて、対応する項目を削除します。
次の例は、myName という変数を Session.Contents コレクションに追加して、削除します。
例1.Removeの例
1234&#60;%
&#160; Session(&#34;myName&#34;) = &#34; &#34;
&#160; Session.Contents.Remove(&#34;myName&#34;)
%&#62;
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Remove &#8212; Contents コレクションから項目を削除します。</p>
<p><strong>Session.Contents.Remove</strong>( Item|Index )</p>
<table class="table_list">
<tr>
<th>パラメータ 	 </th>
<th></th>
</tr>
<tr>
<td>Item 	</td>
<td>コレクションから削除するメンバの名前です。</td>
</tr>
<tr>
<td>Index</td>
<td>コレクションから削除するメンバのインデックス エントリです。</td>
</tr>
</table>
<h3>説明</h3>
<p>Contents.Remove メソッドは、入力パラメータとして文字列または整数のいずれかの値をとります。入力パラメータが文字列の場合、メソッドは Contents コレクション内で名前が文字列と一致する項目を探し、削除します。入力パラメータが整数の場合、メソッドはコレクションの最初から数えて、対応する項目を削除します。</p>
<p>次の例は、myName という変数を Session.Contents コレクションに追加して、削除します。</p>
<p>例1.Removeの例</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;%<br />
&nbsp; Session(<span style="color: #800000;">&quot;myName&quot;</span>) = <span style="color: #800000;">&quot; &quot;</span><br />
&nbsp; Session.Contents.Remove(<span style="color: #800000;">&quot;myName&quot;</span>)<br />
%&gt;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/remove-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abandon</title>
		<link>http://asp.verygoodtown.com/2009/08/abandon</link>
		<comments>http://asp.verygoodtown.com/2009/08/abandon#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:43:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=384</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Abandon &#8212; このメソッドは、Session オブジェクトを破棄してそのリソースを解放します。
Session.Abandon[= nMinutes]


パラメータ



nMinutes
セッションがアイドル状態のまま保持される分数を指定します。この時間が経過するとサーバーは自動的にセッションを終了します。既定値は 10 分です。


説明
Abandon メソッドは、Session オブジェクトに格納されているすべてのオブジェクトを破棄し、リソースを解放します。Abandon メソッドを明示的に呼び出さない場合、サーバーは、セッションがタイムアウトになった時点でそれらのオブジェクトを破棄します。
Abandon メソッドを呼び出すと、現在の Session オブジェクトが削除のためにキューに退避されますが、実際に削除されるのは現在のページのスクリプトコマンドの処理がすべて完了した時点です。つまり、 Abandon を呼び出したページ内であれば Session オブジェクト内の変数にはまだアクセスすることができますが、その後の Web ページではアクセスできなくなります。
たとえば、次のスクリプトの 3 行目は値 Mary を出力します。これは、Session オブジェクトはサーバーがスクリプトの処理を完了するまで破棄されないためです。
例1.Abandonの例
12345&#60;%
&#160; Session.Abandon
&#160; Session(&#34;MyName&#34;) = &#34;Mary&#34;
&#160; Reponse.Write(Session(&#34;MyName&#34;))
%&#62;
しかし、後続の Web ページで変数 MyName にアクセスしても、変数は空になります。これは、上のスクリプトのあるページの処理が完了した時点で MyName と前の Session オブジェクトが破棄されたためです。
セッションを放棄した後に後続の Web ページを開くと、サーバーは新しい Session オブジェクトを作成します。この新しい Session オブジェクトには、変数やオブジェクトを格納することができます。
次の例は、サーバーが現在のページの処理を完了したときにセッション状態が解放されるようにします。
1&#60;% Session.Abandon %&#62;
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Abandon &#8212; このメソッドは、Session オブジェクトを破棄してそのリソースを解放します。</p>
<p><strong>Session.Abandon</strong>[= nMinutes]</p>
<table class="table_list">
<tr>
<th>パラメータ</th>
<th></th>
</tr>
<tr>
<td>nMinutes</td>
<td>セッションがアイドル状態のまま保持される分数を指定します。この時間が経過するとサーバーは自動的にセッションを終了します。既定値は 10 分です。</td>
</tr>
</table>
<h3>説明</h3>
<p>Abandon メソッドは、Session オブジェクトに格納されているすべてのオブジェクトを破棄し、リソースを解放します。Abandon メソッドを明示的に呼び出さない場合、サーバーは、セッションがタイムアウトになった時点でそれらのオブジェクトを破棄します。</p>
<p>Abandon メソッドを呼び出すと、現在の Session オブジェクトが削除のためにキューに退避されますが、実際に削除されるのは現在のページのスクリプトコマンドの処理がすべて完了した時点です。つまり、 Abandon を呼び出したページ内であれば Session オブジェクト内の変数にはまだアクセスすることができますが、その後の Web ページではアクセスできなくなります。</p>
<p>たとえば、次のスクリプトの 3 行目は値 Mary を出力します。これは、Session オブジェクトはサーバーがスクリプトの処理を完了するまで破棄されないためです。</p>
<p>例1.Abandonの例</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;%<br />
&nbsp; Session.Abandon<br />
&nbsp; Session(<span style="color: #800000;">&quot;MyName&quot;</span>) = <span style="color: #800000;">&quot;Mary&quot;</span><br />
&nbsp; Reponse.Write(Session(<span style="color: #800000;">&quot;MyName&quot;</span>))<br />
%&gt;</div></td></tr></tbody></table></div>
<p>しかし、後続の Web ページで変数 MyName にアクセスしても、変数は空になります。これは、上のスクリプトのあるページの処理が完了した時点で MyName と前の Session オブジェクトが破棄されたためです。</p>
<p>セッションを放棄した後に後続の Web ページを開くと、サーバーは新しい Session オブジェクトを作成します。この新しい Session オブジェクトには、変数やオブジェクトを格納することができます。</p>
<p>次の例は、サーバーが現在のページの処理を完了したときにセッション状態が解放されるようにします。</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;% Session.Abandon %&gt;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/abandon/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timeout</title>
		<link>http://asp.verygoodtown.com/2009/08/timeout</link>
		<comments>http://asp.verygoodtown.com/2009/08/timeout#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:25:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=381</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Timeout &#8212; このアプリケーションのセッション状態のタイムアウト時間 (分単位) です。
Session.Timeout[= nMinutes]


パラメータ



nMinutes
セッションがアイドル状態のまま保持される分数を指定します。この時間が経過するとサーバーは自動的にセッションを終了します。既定値は 10 分です。


説明
Timeout プロパティは、このアプリケーションの Session オブジェクトのタイムアウト時間を分単位で指定します。ユーザーがこのタイムアウト時間の間、ページの更新や要求をまったく行わなければ、そのセッションは終了します。
Abandonメソッドも参照ください。
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Timeout &#8212; このアプリケーションのセッション状態のタイムアウト時間 (分単位) です。</p>
<p><strong>Session.Timeout</strong>[= nMinutes]</p>
<table class="table_list">
<tr>
<th>パラメータ</th>
<th></th>
</tr>
<tr>
<td>nMinutes</td>
<td>セッションがアイドル状態のまま保持される分数を指定します。この時間が経過するとサーバーは自動的にセッションを終了します。既定値は 10 分です。</td>
</tr>
</table>
<h3>説明</h3>
<p>Timeout プロパティは、このアプリケーションの Session オブジェクトのタイムアウト時間を分単位で指定します。ユーザーがこのタイムアウト時間の間、ページの更新や要求をまったく行わなければ、そのセッションは終了します。</p>
<p>Abandonメソッドも参照ください。</p>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/timeout/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SessionID</title>
		<link>http://asp.verygoodtown.com/2009/08/sessionid</link>
		<comments>http://asp.verygoodtown.com/2009/08/sessionid#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:23:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=379</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
SessionID &#8212; このユーザーのセッション識別子を返します。
Session.SessionID
説明
SessionID プロパティは、セッション識別子を返します。セッション識別子は、セッションの作成時にサーバーによって生成される一意の識別子です。セッション ID は長整数 (LONG) データ型として返されます。
データベース アプリケーションの主キーの値を生成するために SessionID プロパティを使用することは避けてください。
これは、Web サーバーが再起動した場合に、SessionID の値の一部がサーバーの停止前の値と同じになることがあるためです。
このため、Microsoft SQL Server の IDENTITY や Microsoft Access の COUNTER などの自動インクリメント列データ型を代用してください。
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
SessionID &#8212; このユーザーのセッション識別子を返します。</p>
<p><strong>Session.SessionID</strong></p>
<h3>説明</h3>
<p>SessionID プロパティは、セッション識別子を返します。セッション識別子は、セッションの作成時にサーバーによって生成される一意の識別子です。セッション ID は長整数 (LONG) データ型として返されます。</p>
<p>データベース アプリケーションの主キーの値を生成するために SessionID プロパティを使用することは避けてください。<br />
これは、Web サーバーが再起動した場合に、SessionID の値の一部がサーバーの停止前の値と同じになることがあるためです。<br />
このため、Microsoft SQL Server の IDENTITY や Microsoft Access の COUNTER などの自動インクリメント列データ型を代用してください。</p>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/sessionid/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCID</title>
		<link>http://asp.verygoodtown.com/2009/08/lcid</link>
		<comments>http://asp.verygoodtown.com/2009/08/lcid#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:22:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=376</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
LCID &#8212; ロケール識別子です。
Session.LCID( = LCID )


パラメータ



LCID
有効なロケール識別子です。


説明
LCID はロケール識別子を指定します。ロケール識別子は、各国を数字で表す標準の省略形で、システム定義のロケールの 1 つを一意に識別します。LCID が @LCID ディレクティブを使用して設定されている場合、Session.LCID はディレクティブで設定された値を上書きします。
例1.LCIDの例
次の例は、ロケールを イギリス英語に設定し、VBScript FormatCurrency メソッドを使用して、値 125 を通貨として ￡ 記号を付けて表示します。
123456&#60;%
&#160; Session.LCID = 2057
&#160; Dim curNumb
&#160; curNumb = FormatCurrency(125)
&#160; Response.Write (curNumb)
%&#62;
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
LCID &#8212; ロケール識別子です。</p>
<p><strong>Session.LCID</strong>( = LCID )</p>
<table class="table_list">
<tr>
<th>パラメータ</th>
<th></th>
</tr>
<tr>
<td>LCID</td>
<td>有効なロケール識別子です。</td>
</tr>
</table>
<h3>説明</h3>
<p>LCID はロケール識別子を指定します。ロケール識別子は、各国を数字で表す標準の省略形で、システム定義のロケールの 1 つを一意に識別します。LCID が @LCID ディレクティブを使用して設定されている場合、Session.LCID はディレクティブで設定された値を上書きします。</p>
<p>例1.LCIDの例</p>
<p>次の例は、ロケールを イギリス英語に設定し、VBScript FormatCurrency メソッドを使用して、値 125 を通貨として ￡ 記号を付けて表示します。</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;%<br />
&nbsp; Session.LCID = 2057<br />
&nbsp; <span style="color: #000080;">Dim</span> curNumb<br />
&nbsp; curNumb = FormatCurrency(125)<br />
&nbsp; Response.Write (curNumb)<br />
%&gt;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/lcid/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodePage</title>
		<link>http://asp.verygoodtown.com/2009/08/codepage</link>
		<comments>http://asp.verygoodtown.com/2009/08/codepage#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:15:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=374</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
CodePage &#8212; 記号のマッピングに使われるコード ページです。
Session.CodePage (= Codepage )


パラメータ



Codepage
ASP スクリプト エンジンを実行しているシステムで有効なコード ページを表す符合なし整数です。


説明
CodePage プロパティは、動的コンテンツを表示するときに使用するコード ページを決定します。
コードページは、数字、区切り記号、およびその他の記号を含む文字セットです。言語およびロケールが異なると、異なるコードページが使用されることがあります。たとえば、アメリカ英語とほとんどのヨーロッパ言語では、ANSI コード ページ 1252 が使用されます。日本語漢字では OEM コードページ 932 が使用されます。
コード ページは、文字とシングルバイトの値またはマルチバイトの値とを対応付けた表によって表すことができます。ほとんどのコード ページでは、0&#215;00 ～ 0&#215;7F の範囲の文字に対して ASCII 文字セットを共有しています。
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
CodePage &#8212; 記号のマッピングに使われるコード ページです。</p>
<p><strong>Session.CodePage</strong> (= Codepage )</p>
<table class="table_list">
<tr>
<th>パラメータ</th>
<th></th>
</tr>
<tr>
<td>Codepage</td>
<td>ASP スクリプト エンジンを実行しているシステムで有効なコード ページを表す符合なし整数です。</td>
</tr>
</table>
<h3>説明</h3>
<p>CodePage プロパティは、動的コンテンツを表示するときに使用するコード ページを決定します。</p>
<p>コードページは、数字、区切り記号、およびその他の記号を含む文字セットです。言語およびロケールが異なると、異なるコードページが使用されることがあります。たとえば、アメリカ英語とほとんどのヨーロッパ言語では、ANSI コード ページ 1252 が使用されます。日本語漢字では OEM コードページ 932 が使用されます。</p>
<p>コード ページは、文字とシングルバイトの値またはマルチバイトの値とを対応付けた表によって表すことができます。ほとんどのコード ページでは、0&#215;00 ～ 0&#215;7F の範囲の文字に対して ASCII 文字セットを共有しています。</p>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/codepage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StaticObjects</title>
		<link>http://asp.verygoodtown.com/2009/08/staticobjects-2</link>
		<comments>http://asp.verygoodtown.com/2009/08/staticobjects-2#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:09:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sessionオブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=372</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
StaticObjects &#8212; Applicationオブジェクトを保持

Application.StaticObjects ( Key )


パラメータ



Key
変数名/インデックス(取得するプロパティです。)


説明
StaticObjects コレクションには、セッション オブジェクトのスコープ内で  タグを使用して作成されたすべてのオブジェクトが含まれます。StaticObjects コレクションを使用すると、オブジェクトの特定のプロパティの値を調べたり、コレクションに対して繰り返し処理を行って、すべてのオブジェクトのプロパティを取得したりすることができます。
例1.StaticObjectsの例
123456789101112&#60;%
&#160; Dim
&#160;objProp &#160;For Each objProp in Session.StaticObjects
&#160; &#160; If IsObject(Session.StaticObjects(objProp)) Then
&#160; &#160; &#160; Response.write(objProp &#38; &#34; : Session object cannot be displayed.&#34;&#38;_
&#160; &#160; &#160; &#34;&#60;br /&#62;&#34;)
&#160; &#160; Else
&#160; &#160; Response.write(objprop &#38; &#34; : &#34; &#38; Session.StaticObjects(objprop) &#38;_
&#160; &#160; &#34;&#60;br /&#62;&#34;)
&#160; &#160; End if
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
StaticObjects &#8212; Applicationオブジェクトを保持<br />
<strong><br />
Application.StaticObjects</strong> ( Key )</p>
<table class="table_list">
<tr>
<th>パラメータ</th>
<th></th>
</tr>
<tr>
<td>Key</td>
<td>変数名/インデックス(取得するプロパティです。)</td>
</tr>
</table>
<h3>説明</h3>
<p>StaticObjects コレクションには、セッション オブジェクトのスコープ内で <object> タグを使用して作成されたすべてのオブジェクトが含まれます。StaticObjects コレクションを使用すると、オブジェクトの特定のプロパティの値を調べたり、コレクションに対して繰り返し処理を行って、すべてのオブジェクトのプロパティを取得したりすることができます。</p>
<p>例1.StaticObjectsの例</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;%<br />
&nbsp; <span style="color: #000080;">Dim</span><br />
&nbsp;objProp &nbsp;<span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> objProp <span style="color: #000080;">in</span> Session.StaticObjects<br />
&nbsp; &nbsp; <span style="color: #000080;">If</span> IsObject(Session.StaticObjects(objProp)) <span style="color: #000080;">Then</span><br />
&nbsp; &nbsp; &nbsp; Response.write(objProp &amp; <span style="color: #800000;">&quot; : Session object cannot be displayed.&quot;</span>&amp;_<br />
&nbsp; &nbsp; &nbsp; <span style="color: #800000;">&quot;&lt;br /&gt;&quot;</span>)<br />
&nbsp; &nbsp; <span style="color: #000080;">Else</span><br />
&nbsp; &nbsp; Response.write(objprop &amp; <span style="color: #800000;">&quot; : &quot;</span> &amp; Session.StaticObjects(objprop) &amp;_<br />
&nbsp; &nbsp; <span style="color: #800000;">&quot;&lt;br /&gt;&quot;</span>)<br />
&nbsp; &nbsp; <span style="color: #000080;">End</span> <span style="color: #000080;">if</span><br />
&nbsp; <span style="color: #000080;">Next</span><br />
%&gt;</div></td></tr></tbody></table></div>
<p>ループ制御構造を使用すると、StaticObjects コレクションのすべての要素を対象として繰り返し処理を行うことができます。</p>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/staticobjects-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

