Ninja Database Pro
LoadSchema Method
Example 



KellermanSoftware.NinjaDatabasePro Namespace > NinjaDbPro Class : LoadSchema Method
Load the Schema from the database
Syntax
Public Function LoadSchema() As List(Of Table)
Dim instance As NinjaDbPro
Dim value As List(Of Table)
 
value = instance.LoadSchema()
public List<Table> LoadSchema()
public:
List<Table^>^ LoadSchema(); 
Example
NinjaDbPro db = new NinjaDbPro("MyDatabaseDirectory", "MyDatabaseName");
             
            //Licensed Mode
            //db.UserName = "John Smith 101224";
            //db.LicenseKey = "aousdf832jasf==";
             
            //Set before OpenDatabase. Default storage is IsolatedStorageDatabase. Other options are:
            //db.Storage = new MemoryDatabase(); //In memory database
            //db.Storage = new FileDatabase();  
             
            db.OpenDatabase();
             
            Person person1 = new Person();
            person1.DateCreated = DateTime.Now;
            person1.Name = "Greg1";
            db.Save(person1);
             
            List<Table>  results = db.LoadSchema();
             
            db.CloseDatabase();
Dim db As New NinjaDbPro("MyDatabaseDirectory", "MyDatabaseName")
             
            'Licensed Mode
            'db.UserName = "John Smith 101224";
            'db.LicenseKey = "aousdf832jasf==";
             
            'Set before OpenDatabase. Default storage is IsolatedStorageDatabase. Other options are:
            'db.Storage = new MemoryDatabase(); //In memory database
            'db.Storage = new FileDatabase();  
             
            db.OpenDatabase()
             
            Dim person1 As New Person()
            person1.DateCreated = Date.Now
            person1.Name = "Greg1"
            db.Save(person1)
             
            Dim results As List(Of Table) = db.LoadSchema()
             
            db.CloseDatabase()
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

NinjaDbPro Class
NinjaDbPro Members