diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-B9A3B17E-BDEB-5F66-968C-080335A721AC.dita --- a/Symbian3/PDK/Source/GUID-B9A3B17E-BDEB-5F66-968C-080335A721AC.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-B9A3B17E-BDEB-5F66-968C-080335A721AC.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,51 +1,51 @@ - - - - - -Writing -from a Data StreamThis tutorial describes how to write data from a data stream to -a database. -
Introduction

This is useful when populating your -database with the results of some other operation.

-
Basic procedure

The high level steps to write from -a data stream to a database table are shown here:

    -
  1. Instantiate the necessary -objects.

  2. -
  3. Write data into the -table.

  4. -
  5. Commit the stream.

  6. -
-
Writing from a data stream into a table

The process -of writing data from a data stream into a table can be explained as follows:

Instantiate the necessary objects

    -
  1. Instantiate an object -of the RSqlStatement and RSqlParamWriteStream class. -Also declare the variables as shown.

    RSqlStatement myStatement; -TInt err; -TInt myParameterIndex; -RSqlParamWriteStream myStream; -RBuf buf; -
  2. -
  3. Clean up the stack.

    CleanupClosePushL(myStream);
  4. -

Write -data into the table

    -
  1. Obtain access to the -data as a stream of characters.

    User::LeaveIfErrormyStream.BindTextL(myStatement,myParameterIndex));
  2. -
  3. Write the buffer.

    myStream.WriteL(buf);
  4. -

Commit -the stream

Commit the stream. This ensures that the streamed data -is written into the table and cannot be rolled back.

myStream.CommitL();
-
See also

Querying -a Database

Inserting -a Row into a Table

Deleting -Rows from a Table

Reading -to a Buffer

Reading -to Memory

Reading -to a Data Stream

Writing from a Data Stream - This document

Performing Scalar Queries

+ + + + + +Writing +from a Data StreamThis tutorial describes how to write data from a data stream to +a database. +
Introduction

This is useful when populating your +database with the results of some other operation.

+
Basic procedure

The high level steps to write from +a data stream to a database table are shown here:

    +
  1. Instantiate the necessary +objects.

  2. +
  3. Write data into the +table.

  4. +
  5. Commit the stream.

  6. +
+
Writing from a data stream into a table

The process +of writing data from a data stream into a table can be explained as follows:

Instantiate the necessary objects

    +
  1. Instantiate an object +of the RSqlStatement and RSqlParamWriteStream class. +Also declare the variables as shown.

    RSqlStatement myStatement; +TInt err; +TInt myParameterIndex; +RSqlParamWriteStream myStream; +RBuf buf; +
  2. +
  3. Clean up the stack.

    CleanupClosePushL(myStream);
  4. +

Write +data into the table

    +
  1. Obtain access to the +data as a stream of characters.

    User::LeaveIfErrormyStream.BindTextL(myStatement,myParameterIndex));
  2. +
  3. Write the buffer.

    myStream.WriteL(buf);
  4. +

Commit +the stream

Commit the stream. This ensures that the streamed data +is written into the table and cannot be rolled back.

myStream.CommitL();
+
See also

Querying +a Database

Inserting +a Row into a Table

Deleting +Rows from a Table

Reading +to a Buffer

Reading +to Memory

Reading +to a Data Stream

Writing from a Data Stream - This document

Performing Scalar Queries

\ No newline at end of file