Show / Hide Table of Contents

    DataStoreDataExtensions.ExportRowAsString(this IDataStoreBase dataStore, int row, DwBuffer dwBuffer = DwBuffer.Primary) Method

    .NET Standard 2.x

    Exports a row data from the specified buffer to a TXT string.

    Namespace: DWNet.Data

    Assembly: DWNet.Data.dll

    Syntax

    public static string ExportRowAsString(this IDataStoreBase dataStore, int row,
     DwBuffer dwBuffer = DwBuffer.Primary)
    

    Parameters

    row System.Int32

    The zero-based index number of the first row in the buffer that you want to export.

    dwbuffer DWNet.Data.DwBuffer

    A value of the DwBuffer enumerated datatype identifying the DataStore buffer from which you want to export the data.

    Returns

    System.String

    Returns the string if it succeeds.

    Examples

    The following code example demonstrates how to export a data row from the specified buffer to a string.

    using DWNet.Data;
    using System;
    
    namespace Appeon.ApiDoc.DataStoreDataExtensionsExamples
    {
        public class ExportRowAsStringExample
        {
            private readonly SchoolContext _context;
    
            public ExportRowAsStringExample(SchoolContext dataContext)
            {
                // Sets the data context
                _context = dataContext;
            }
    
            public void Example()
            {
                // Instantiates a DataStore object with datawindow: d_department.
                var datastore = new DataStore("d_department", _context);
    
                datastore.Retrieve();
    
                // Exports the first row of data from the primary buffer.
                string str = datastore.ExportRowAsString(0, DwBuffer.Primary);
    
                Console.WriteLine(str);
    
                /*This code produces the following output:
    
                1\t\"Engineering\"\t220000.0000\t2007/9/1 00:00:00\t2\r\n
    
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Department
    DataWindow File: d_department

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon