XConnection Class |
Namespace: Biolomics.BioCallback
The XConnection type exposes the following members.
Name | Description | |
---|---|---|
![]() | XConnection |
Initializes a new instance of the XConnection class.
|
Name | Description | |
---|---|---|
![]() | DatabaseName |
Gets the name of the database.
|
![]() | DataLayoutMap |
Gets or sets the DataLayoutMap in the current connection.
|
![]() | DbWorldId |
Gets the DbWorldId : the unique identifier of the database.
|
![]() | RootName |
Gets the name of the root user in the database.
|
Name | Description | |
---|---|---|
![]() | CanChangeHeaderInTable |
Determines whether this instance can change header in the specified table .
|
![]() | CanDeleteFromTable |
Determines whether this instance can delete from the specified table .
|
![]() | CanReadField |
Determines whether this instance can read the specified field .
|
![]() | CanReadFromTable |
Determines whether this connection can read from specified table.
|
![]() | CanWriteAllFieldsIntoTable |
Determines whether this instance can write all fields into the specified table key.
|
![]() | CanWriteField |
Determines whether this instance can write the specified field .
|
![]() | CanWriteIntoTable |
Determines whether this instance can write into the specified table .
|
![]() | Connect |
Connect to current database.
|
![]() | ConnectionDef |
Gets the Connection definition.
|
![]() | CurrentUserEmail |
Gets the current user email.
|
![]() | CurrentUserName |
Gets the current user name.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | FieldDefMap |
Gets the FieldDefMap in the current connection.
|
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetFieldByDbName |
Gets the field by db name.
|
![]() | GetFieldByUserName |
Gets the field definition by user name.
|
![]() | GetFieldByUserNameEng |
Gets the field by user name eng.
|
![]() | GetFieldDef(Int64) |
Gets the field definition by field key.
|
![]() | GetFieldDef(Int64, String) |
Gets the field definition by field Sql name.
|
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLayout |
Gets the layout by layout key.
|
![]() | GetTableDef |
Gets the table definition.
|
![]() | GetTableDefByDbName |
Gets the table definition by Table SQL name.
|
![]() | GetTableDefByUserName |
Gets the table definition by Table user name.
|
![]() | GetTableDefByUserNameEng |
Gets the table definition by user name english.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetUserDef |
Gets the user definition.
|
![]() | GroupDefMap |
Gets the GroupDefMap in the current connection.
|
![]() | IsAdmin |
Determines whether this user is admin.
|
![]() | IsConnected | Obsolete.
Determines whether the current user is connected.
|
![]() | IsReachable |
Determines whether this connection is reachable.
|
![]() | Key |
Gets the Connection key.
|
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ReadFastQuery |
Same as ReadQuery just it is used to load fast queries with small timeout.
|
![]() | ReadQuery |
Executes a TQuery to load some records
Used to load records or execute some specific queries.
|
![]() | TableDefMap |
Gets the TableDefMap in the current connection.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Imports System Imports BioloMICS.BioCallback Imports BioloMICS.SharedClasses Public Class Program <STAThread()> Shared Sub Main() Dim c As New Program c.ChangeRecordDetails() End Sub ' Write sub functions here Public Sub ChangeRecordDetails() ' get the current connection Dim SqlCo As XConnection = Run.GetCurrentConnection() If SqlCo Is Nothing Then Return End If ' get the current layout Dim Layout As XDataLayout = Run.GetCurrentLayout() If Layout Is Nothing Then ' no current layout in a search page Return End If ' get the current table Dim TableDef As XTableDef = SqlCo.GetTableDef(Layout.TableKey) If TableDef Is Nothing Then ' should never happen Return End If ' load all records Dim Where As XWhere = XWhere.All ' use an empty FieldDefMap Dim FieldDefMap As New XFieldDefMap ' load the records Dim RecordMap As XRecordMap = Run.LoadRecords(TableDef.Key, FieldDefMap, Where) For Each Record As XRecord In RecordMap ' change the record details, located in the record header Record.Details = "This is record #" & Record.Id.ToString Record.Save(False) Next ' load the records second methode Dim newRecordMap As New XRecordMap Run.LoadRecords(newRecordMap, TableDef.Key, FieldDefMap, Where) For Each Record As XRecord In newRecordMap ' change the record details, located in the record header empty string instead of old value Record.Details = String.Empty Record.Save(False) Next End Sub End Class