Archive for March, 2007

List all triggers in MS-SQL database

Title says it all. Sql statement to enumerate all triggers in a MS-SQL instance.

SELECT b.[Name] + ‘.’ + a.[Name] as TriggerName
FROM sysobjects a JOIN
sysobjects b ON a.Parent_Obj = b.ID
WHERE a.xtype = ‘TR’

Meaning of sysobject.xtype values

D : ?
F : foreign keys
FN : user defined [...]

More »

Speed differences between CStr() and Convert.ToString() (vb)

In VB.NET there is a shortcut for Convert.ToString in the form of CStr. In the same form there are shortcuts for integers (CInt), booleans (CBool) and dates (CDate). CStr and the like can be found in the Microsoft.VisualBasic namespace. Because CStr is supposed to be a shortcut to Convert.ToString, I was curious about the speed [...]

More »