BizBlox
GetSqlBuilder Method
Namespacespixolut.BizBloxDOCollectionGetSqlBuilder()()()
BizBlox
Get a new (empty) instance of a SQLBuilder for this DOCollection.
Declaration Syntax
C#Visual BasicVisual C++
public SQLBuilder GetSqlBuilder()
Public Function GetSqlBuilder As SQLBuilder
public:
SQLBuilder^ GetSqlBuilder()
Return Value
A correctly configured empty SQLBuilder for this DOCollection
Remarks

The following is an example of GetSqlBuilder being used within a FindBy method of a StudentCollection:

CopyC#
Public Sub FindByStudentName(ByVal name As String)
    Dim mySql As SQLBuilder = MyBase.GetSqlBuilder()
    mySql.addWhere(Student.Columns.Name, name)
    MyBase.SetCurrentQuery(mySql)
    MyBase.find()
End Sub

GetSqlBuilder can also be called externally, for example:

CopyC#
Dim sColl as New StudentCollection
Dim mySql as SQLBuilder = sColl.GetSqlBuilder()
mySql.addWhere(Student.Columns.Name, name)
sColl.SetCurrentQuery(mySql)
sColl.Find()

In the above examples, the call to GetSqlBuilder() is the equivalent of calling:

CopyC#
Dim mySQL as New SQLBuilder("Student")

The GetSqlBuilder method differs from the GetCurrentQuery method in that GetSqlBuilder returns a new or empty instance of a SQLBuilder, whereas GetCurrentQuery returns the SQLBuilder that has been previously set in the DOCollection using the SetCurrentQuery method or if none exists, it will provide a new one.

Assembly: pixolut.BizBlox (Module: pixolut.BizBlox) Version: 1.8.5.0