Gary Menzel wrote:

If the temporary table already exists (which can be the case if you get another parameter wrong during the install that is processed by the page) then you get an "already exists" error.


Try this code. It first tries to delete the temp table if exists, then try and create/catch error as before.

<!--- check if mysql check privledges are set correctly --->
<cfif form.dbtype eq "mysql">
<cftry>
<!--- delete temp table --->
<cfquery name="qDeleteTemp" datasource="#form.appDsn#">
DROP TABLE IF EXISTS tblTemp1
</cfquery>
<cfcatch></cfcatch>
</cftry>
<cftry>
<!--- test temp table creation --->
<cfquery name="qTestPrivledges" datasource="#form.appDsn#">
create temporary table `tblTemp1`
(
`test` VARCHAR(255) NOT NULL
)
</cfquery>

<cfcatch>
<!--- display form with error message --->
<cfset errorMsg = "You need to have Create_tmp_table_priv privilege set to true for your MySQL user">
<cfinclude template="_installForm.cfm">
<cfabort>
</cfcatch>
</cftry>
</cfif>


-Brendan
http://farcry.daemon.com.au

---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to