<!--#include file="../../owFunctions/I_GeneralFunctions.asp"-->
<!--#include file="../header.asp"-->
<%
	'************************************************************************************
	'*																					*
	'*	MODIFICATION TO THIS SCRIPT OR ANY FILES INCLUDED WITH 							*
	'*		ONEWORLDSTORE IS DONE AT YOUR OWN RISK!										*
	'*	Product  : OneWorldStore														*
	'*	Version  : 9.0000																*
	'*	Modified : June 2004															*
	'*	Copyright:	Copyright (C) 2004 OneWorldStore.Com								*
	'*				Registration Number: 1024507										*
	'*				http://strategis.ic.gc.ca/											*
	'*																					*
	'************************************************************************************
	
	Dim iStart, iTime
	
	%>
	<body style="font-family: Arial; font-size: 11px" topmargin="0" leftmargin="0" bgcolor=C3DAF9>
		<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>
			<tr>
				<td align=center valign=center>
					<table border="0" cellpadding="0" cellspacing="10" style="font-size: 11px;" bgcolor=FFFFFF>
						<tr>
							<td align=center bgcolor=EAF1F9>
								<b><%=LANG_DT( "SPEED_TEST_HEAD", "Database Speed Test" )%></b>
							</td>
						</tr>
						<tr>
							<td>
								<%
								On Error Resume Next
								bCrashed = False
								
								Response.Write LANG_DT( "SPEED_TEST_INSERTING", "Inserting 1,000 rows into TestTable...<br><br>" )
								
								iStart = Timer
								For iX = 1 To 1000
									Call DB_updateDatabase("INSERT INTO TestTable (TestContents) VALUES ('Speed Test_" & iX & "')")
									If ( Err.Number <> 0 ) Then
										bCrashed = True
										Response.Write Replace(LANG_DT( "SPEED_TEST_CRASH", "Insertion failed! Added 1: rows. Attempting to delete row(s)." ), "1:", iX)
										Call DB_updateDatabase("DELETE FROM TestTable WHERE TestContents LIKE 'Speed Test_%'")
										Exit For
									End If
								Next
								iTime = Round(CDbl(Timer - iStart), 4)
								
								If ( bCrashed ) Then
								Else
									Response.Write Replace(LANG_DT( "SPEED_TEST_INSERT_RESULTS", "Insertion test took 1: seconds<br><br>"), "1:", iTime)
									
									Response.Write "<hr size=1 color=000000>"
									Response.Write LANG_DT( "SPEED_TEST_SEARCHING", "Searching...<br><br>")
									iStart = Timer
									Call DB_getFromDatabase("SELECT Count(*) FROM TestTable", rsStoreData, "")
									If ( NOT rsStoreData.EOF ) Then
										Response.Write Replace(LANG_DT( "SPEED_TEST_SEARCH_FOUND", "Search found 1: records.<br><br>"), "1:", rsStoreData(0))
									Else
										Response.Write LANG_DT( "SPEED_TEST_SEARCH_NOTFOUND", "Search was unable to find any records.<br><br>")
									End If
									Call DB_closeRecordset(rsStoreData)
									iTime = Round(CDbl(Timer - iStart), 4)
									Response.Write Replace(LANG_DT( "SPEED_TEST_SEARCH_RESULTS", "Searching test took 1: seconds<br><br>"), "1:", iTime)
									
									Response.Write "<hr size=1 color=000000>"
									iStart = Timer
									Call DB_updateDatabase("DELETE FROM TestTable WHERE TestContents LIKE 'Speed Test_%'")
									iTime = Round(CDbl(Timer - iStart), 4)
									Response.Write Replace(LANG_DT( "SPEED_TEST_DEL_RESULTS", "Deletion test took 1: seconds<br><br>"), "1:", iTime)
								End If
								%>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	<!--#include file="../footer.asp"-->