Knight Data Access Layer
SupportsIdentity Property (DataHelper)
Example 




KellermanSoftware.NetDataAccessLayer Namespace > DataHelper Class : SupportsIdentity Property
Returns true if the attached database provider supports identity columns
Syntax
Public Overridable ReadOnly Property SupportsIdentity As Boolean
Dim instance As DataHelper
Dim value As Boolean
 
value = instance.SupportsIdentity
public virtual bool SupportsIdentity {get;}
public: __property virtual bool get_SupportsIdentity();
public:
virtual property bool SupportsIdentity {
   bool get();
}
Example
//Get the current thread static safe instance of the helper
IDataHelper db = DataHelper.SessionFactory();
 
//Specify User Name and License Key from the receipt, leave blank for trial mode
//db.UserName = "John Smith 1234";
//db.LicenseKey = "asdfl219==";
 
//This will be true for MS Access, SQL Server, and VistaDb
Console.WriteLine(db.SupportsIdentity);
'Get the current thread static safe instance of the helper
Dim db As IDataHelper = DataHelper.SessionFactory()
 
'Specify User Name and License Key from the receipt, leave blank for trial mode
'db.UserName = "John Smith 1234"
'db.LicenseKey = "asdfl219=="
 
'This will be true for MS Access, SQL Server, and VistaDb
Console.WriteLine(db.SupportsIdentity)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataHelper Class
DataHelper Members