Board index » delphi » Getting rid of "SET NO_BROWSETABLE ON" ?

Getting rid of "SET NO_BROWSETABLE ON" ?

Hi,
I have an application where "SET NO_BROWSETABLE ON" is driving me nuts.
Using D5 SP1, ADOExpress UP2, MDAC2.6, SQL2000, W2000 prof.

I have a master-detail relationship where the detail is represented in a
grid with a GUID and an Autoinc as keys. The Dataset is a TBetterADO dataset
(great !!), and in my test-app it works exactly as assumed, generating the
SQL below when inserting a new row in the detail grid:

SET NO_BROWSETABLE ON
go
select PersonID, Navn from PERSON
go
exec sp_executesql N'select * from JOULINIE where PersonID=@P1', N'@P1
uniqueidentifier', '0FD805DB-1AE6-41EE-A1C0-0004997D7C9C'
go
exec sp_executesql N'INSERT INTO "XDONT_D5".."JOULINIE"
("PersonID","KontinuationType") VALUES (@P1,@P2)', N'@P1
uniqueidentifier,@P2 tinyint', '0FD805DB-1AE6-41EE-A1C0-0004997D7C9C', 8
go
SELECT @@IDENTITY
go

However, when the code from the test-app is moved into the real (huge) app,
the huge app generates extra SET NO_BROWSETABLE ON and GO commands before
the two 'exec....' and SELECT @@IDENTITY commands breaking the link between
INSERT and @@IDENTITY so that it always returns '0' to the identity field on
insert-refresh.

All components are copied from the test-app to the huge app except the
ADOConnection where I have checked all properties/events.

Does anyone knows what decides when/where ADO inserts (extra) "SET
NO_BROWSETABLE ON" commands in one situation but not in another.

The two apps are of course running on the same PC, same server etc.

Kind regards
Rene Pape

 

Re:Getting rid of "SET NO_BROWSETABLE ON" ?


Quote
> Does anyone knows what decides when/where ADO inserts (extra) "SET
> NO_BROWSETABLE ON" commands in one situation but not in another.

SET NO_BROWSETABLE ON/OFF is an undocumented
setting that introduced some bugs in SQL6.5/SP3.
Because it's not documented I guess your best option would
be to direct this question to MS support.
From what I know this setting is used by RDS to prevent the
creation of temporary tables by the server when processing
select statements.

Good luck
--
Vassil Nazarov
IT Manager, Sofia Cable SA

Other Threads