Combining SQL statements is off by default and can be turned on with a
JDBC URL parameter.  I just blogged more detail here:

http://www.sumoc.com/blog/index.cfm?mode=entry&entry=7F6F7314-5004-2066-B7A8BDFB26843712

-Cameron

On 5/26/05, Joe Graves <[EMAIL PROTECTED]> wrote:
> Hi,
> I ran into a problem creating a mysql database with coldfusion.  I'm trying 
> to create one cfquery to make a mysql database and create all of the tables.  
> When I do this Coldfusion throughs a "Syntax" error.  Any
> thoughts on how I can combine the queries to make just one CFQUERY call. I 
> have listed my code below.
>
> --- Thanks
>
> <b>This Works:</b>
>
> <CFQUERY NAME="NEwDB" DATASOURCE="MyTSLLighting">
> CREATE DATABASE IF NOT EXISTS CandleFoot
>
> </CFQUERY>
>
> <CFQUERY NAME="NEwDB" DATASOURCE="MyTSLLighting">
> DROP TABLE IF EXISTS tblcalendarcolors
> </CFQUERY>
>
> <CFQUERY NAME="NEwDB" DATASOURCE="MyTSLLighting">
> CREATE TABLE tblcalendarcolors (
>   CalendarColorID int(11) NOT NULL auto_increment,
>   CalendarColor varchar(100) default '',
>   PRIMARY KEY  (CalendarColorID)
> );
> </CFQUERY>
>
>
>
> <b>This I can't get to work:</b>
>
> <CFQUERY NAME="NEwDB" DATASOURCE="MyTSLLighting">
> CREATE DATABASE IF NOT EXISTS CandleFoot
>
> DROP TABLE IF EXISTS tblcalendarcolors
>
> CREATE TABLE tblcalendarcolors (
>   CalendarColorID int(11) NOT NULL auto_increment,
>   CalendarColor varchar(100) default '',
>   PRIMARY KEY  (CalendarColorID)
> );
> </CFQUERY>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2422
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to