Regions quirk in dbForge 3.0 SQL Server Express
Posted: Fri 03 Jan 2014 20:00
I just downloaded dbForge for SQL Server Express 3.0 and am blown away -- it's great!
However, in typically annoying fashion (I'm the annoying one, not your software
) I found a little hiccup right away.
I was unable to get the #region and #endregion commands to apply outlining. In one case, all I wanted to do was put a region around a block of comment notes (delimnited with /* and */) to let me hide them. Didn't work. In a second instance I tried to put a region around a block of CREATE SYNONYM commands, which also didn't work.
I tried to use a simple BEGIN..END construct:
BEGIN -- My notes
/*
All my notes are here
*/
END
or...
BEGIN -- Create synonyms
IF NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE [name] = 'MasterProperties' AND XTYPE = 'SN')
CREATE SYNONYM MasterProperties for OtherDatabase..MasterProperties
IF NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE [name] = 'Lease' AND XTYPE = 'SN')
CREATE SYNONYM Lease for OtherDatabase..Lease
END -- end of Create Synonyms
That worked for collapsing the section, but SQL considered it a syntax error.
Any thoughts? I hope you find this information useful.
Running on Windows XP, connecting to SQL Server 2005. (Someone get me into the current decade!)
Barry Seymour
However, in typically annoying fashion (I'm the annoying one, not your software

I was unable to get the #region and #endregion commands to apply outlining. In one case, all I wanted to do was put a region around a block of comment notes (delimnited with /* and */) to let me hide them. Didn't work. In a second instance I tried to put a region around a block of CREATE SYNONYM commands, which also didn't work.
I tried to use a simple BEGIN..END construct:
BEGIN -- My notes
/*
All my notes are here
*/
END
or...
BEGIN -- Create synonyms
IF NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE [name] = 'MasterProperties' AND XTYPE = 'SN')
CREATE SYNONYM MasterProperties for OtherDatabase..MasterProperties
IF NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE [name] = 'Lease' AND XTYPE = 'SN')
CREATE SYNONYM Lease for OtherDatabase..Lease
END -- end of Create Synonyms
That worked for collapsing the section, but SQL considered it a syntax error.
Any thoughts? I hope you find this information useful.
Running on Windows XP, connecting to SQL Server 2005. (Someone get me into the current decade!)
Barry Seymour