Saving a Record

All data access is handled by two methods, which are Load and Save. The Save method stores formatted text to a string, which is then passed on to the database engine using Visual Studio's ADO functions.

[C#]
private void PutRecord()
{
    string sRTFData;

    textControl1.Save (out sRTFData, 
        TXTextControl.StringStreamType.RichTextFormat);
    dsRTFData.Tables[0].Rows[iCurrentRow][0] = sRTFData;
}
[Visual Basic]
Private Sub PutRecord()
    Dim SRTFData As String

    TextControl1.Save(SRTFData, TXTextControl.StringStreamType.RichTextFormat)
    DsRTFData.Tables(0).Rows(ICurrentRow).Item("rtf_item") = SRTFData
End Sub

Other text formats can be used by simply changing the second parameter of the Save method.

<< Previous Next >>