What I want to do is that when user type in the sql query in textarea box, it is excuted in the next page. I have tried as follows. It is working when I run select SQL statement. However, when I run update or insert SQL statement, I get "The page cannot be displayed. HTTP 500 - Internal server error" Anyone tell me why and how to overcome this?
sqlrun.cfm
<form method="POST" ACTION = "sqlrun_fin.cfm">
<table width="426" border="0" cellspacing="0">
<tr bgcolor="#0000FF">
<td width="424" height="21"><strong><font color="#FFFF66" size="2" face="Arial, Helvetica, sans-serif">SQL</font></strong></td>
</tr>
<tr bordercolor="#FFFF99">
<td><textarea name="mysql" cols="65" rows="5"></textarea>
</td>
</tr>
</table>
<table width="429" border="0">
<tr>
<td width="191"><input type="submit" name="Submit" value="Submit"></td>
</tr>
</form>
sqlrun_fin.cfm
<cfquery NAME = "srun" datasource="scm">
#FORM.MYSQL#
</cfquery>
<h1 class="style1">SQL Run Completed!!
sqlrun.cfm
<form method="POST" ACTION = "sqlrun_fin.cfm">
<table width="426" border="0" cellspacing="0">
<tr bgcolor="#0000FF">
<td width="424" height="21"><strong><font color="#FFFF66" size="2" face="Arial, Helvetica, sans-serif">SQL</font></strong></td>
</tr>
<tr bordercolor="#FFFF99">
<td><textarea name="mysql" cols="65" rows="5"></textarea>
</td>
</tr>
</table>
<table width="429" border="0">
<tr>
<td width="191"><input type="submit" name="Submit" value="Submit"></td>
</tr>
</form>
sqlrun_fin.cfm
<cfquery NAME = "srun" datasource="scm">
#FORM.MYSQL#
</cfquery>
<h1 class="style1">SQL Run Completed!!