Hi David,
As soon as we're convinced the semicolon isn't "dangerous" - i.e. it
must work on systens where the current code works - we'll add it.
Shouldn't take too long to sort out so hang in there :-)
Thing is, T-SQL shouldn't require a semicolon between the insert and
select statement, although it does support it. The semicolon it's an
ANSI SQL thing. So, the code should work with as well as without the
semicolon. And so it does on all other system we've come by so far.
We really like to know more about your database server and, possibly,
the ODBC-driver. Perhaps, there's a setting somewhere to force the
system into some kind of "mandatory ANSI" mode? The code below
implements the scenario at hand here using both constructs. Does it
fail on your SQL Server?
create table testSC
(
c_id int identity(1,1) primary key not null,
c_name nvarchar(50) null
)
GO
insert into testSC (c_name) values ('without; ') select scope_identity
()
GO
insert into testSC (c_name) values ('with ;'); select scope_identity()
GO
//Ola