create table dbo.t_migrate (
[apid] [int] NULL ,
[artgroup] [nvarchar](10) NULL ,
[triggertype] [nvarchar](1) NULL ,
[trigger] [real] NULL ,
[span] [int] NULL ,
[increasetype] [nvarchar](1) NULL ,
[increaseamt] [real] NULL ,
[increasepercent] [real] NULL ,
[increaselevel] [smallint] NULL ,
[lastincdate] [datetime] NULL ,
[countfromdate] [datetime] NULL ,
[createdate] [datetime] NULL ,
[noautoincs] [int] NULL ,
[isactive] [bit] NULL ,
[description] [ntext] NULL
)
this query works in query analyzer with SQL 2000... in cf it produces
the sql error "incorrect syntax near the keyword 'trigger'
So in a vain attempt to make this work the way it's supposed to, I
tried executing the sp_executeSQL stored procedure with this string of
sql code as the statement parameter only to discover that it won't
work without a unicode argument and there's no way for me to pass a
unicode value to it from ColdFusion (even though CF supports unicode).
Don't ask me why - but it wouldn't accept cf_sql_varchar or
cf_sql_longvarchar even after using cfprocessingdirective to make sure
the character set was UTF-8 ... and ther aren't any cf_sql_nvarchar
values as far as I know... are there? did I miss something?
Anyway, so I create another stored procedure...
create procedure p_createTable
@tabledef varchar(4000)
as
declare @myvar nvarchar (4000);
set @myvar = convert(nvarchar(4000),@tabledef);
exec sp_executeSQL @myvar;
go
again, everything is hunky-dory when executed in query analyzer. When
I execute the same procedure with the same argument in CF, SQL Server
chews it up and spits it out again with the _same_ error "incorrect
syntax near keyword 'trigger'"
I'm at my wit's end... Any help would be greatly appreciated...
s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

