<!--#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/											*
	'*																					*
	'************************************************************************************
	%>
	<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( "DATABASE_WRITE_HEAD", "Database Read/Write/Delete Test" )%></b>
							</td>
						</tr>
						<tr>
							<td>
								<%
								On Error Resume Next
								
								Response.Write LANG_DT( "DATABASE_WRITE_TEST", "Writing to the TestTable...<br><br>" )
								Call DB_updateDatabase("INSERT INTO TestTable (TestContents) VALUES ('OneWorldStore')")
								If ( Err.Number <> 0 ) Then
									Response.Write Replace(LANG_DT( "DATABASE_WRITE_TEST_FAILED", "Write test failed! Error message returned: <br>1:<br><br>Please make sure the IUSR_Computername account has read/write permissions for the OneWorldStore.mdb database file." ), "1:", Err.Description)
								Else
									Response.Write LANG_DT( "DATABASE_READ_TEST", "Reading from the TestTable...<br><br>" )
									Response.Write "<hr size=1 color=000000><br>"
									Call DB_getFromDatabase("SELECT * FROM TestTable", rsStoreData, "")
									If ( Err.Number <> 0 ) Then
										Response.Write Replace(LANG_DT( "DATABASE_READ_TEST_FAILED", "Read test failed! Error message returned: <br>1:<br><br>" ), "1:", Err.Description)
									Else
										If ( NOT rsStoreData.EOF ) Then
											Response.Write LANG_DT( "DATABASE_READ_TEST_SUCCESS", "Read test returned successfully!<BR><BR>" )
										Else
											Response.Write LANG_DT( "DATABASE_READ_TEST_ERROR", "Read test returned successfully, however was unable to return any rows.<BR><BR>" )
										End If
										Call DB_closeRecordset(rsStoreData)
										
										Call DB_updateDatabase("DELETE FROM TestTable WHERE TestContents = 'OneWorldStore'")
										If ( Err.Number <> 0 ) Then
											Response.Write Replace(LANG_DT( "DATABASE_DELETE_TEST_FAILED", "Deletion test failed! Unable to delete row added to the TestTable. Error message returned: <br>1:<br><br>" ), "1:", Err.Description)
										Else
											Response.Write LANG_DT( "DATABASE_DELETE_TEST_SUCCESS", "Deletion of the added row was successful!" )
										End If
									End If
								End If
								
								On Error Goto 0
								If ( InStr(UCase(sDatabaseConnectionString), "\OWDATABASE\ONEWORLDSTORE.MDB") > 0 ) Then
									Response.Write "<hr size=1 color=000000><br>" & LANG_DT( "SECURITY_MODDBLOC", "Your MS Access OneWorldStore database is in the default folder on your server (owDatabase/OneWorldStore.mdb).<br><br>You may wish to rename it, or move it to a new location to increase the level of security in your store.<br><br>If you move or rename your database, please also change the sDatabaseConnectionString variable within the owFunctions/I_Globals.asp file to the new location." )
								End If
								%>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	<!--#include file="../footer.asp"-->