Step - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Database[SQLite]

  

Step

  

evaluate a prepared SQL statement

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Step( statement )

Parameters

statement

-

prepared SQL statement obtained using the Prepare command

Description

• 

The Step command evaluates a prepared SQL statement.

• 

Possible return values are

– 

RESULT_BUSY means that the database engine was unable to acquire the database locks it needs to do its job. If the statement is a COMMIT or occurs outside of an explicit transaction, then you can retry the statement. If the statement is not a COMMIT and occurs within an explicit transaction then you should rollback the transaction before continuing.

– 

RESULT_DONE means that the statement has finished executing successfully. Step should not be called again on this prepared statement without first calling Reset to reset the statement back to its initial state.

– 

RESULT_ROW is returned each time a new row of data is ready for processing. The values may be accessed using the Fetch or FetchRow commands. Call Step again to retrieve the next row of data.

Examples

[Math Processing Error]

Create in memory database

[Math Processing Error]

Create table test with on column val1

[Math Processing Error]

Insert sample data - prepare statement

[Math Processing Error]

[Math Processing Error]

(1)

Execute the statement

[Math Processing Error]

Finalize the statement

[Math Processing Error]

Select data from table - prepare statement

[Math Processing Error]

[Math Processing Error]

(2)

Evaluate the statement to get the first row

[Math Processing Error]

Get value

[Math Processing Error]

[Math Processing Error]

(3)

Evaluate statement to get the next row

[Math Processing Error]

Get value

[Math Processing Error]

[Math Processing Error]

(4)

Evaluate the statement to the next row

[Math Processing Error]

Get value

[Math Processing Error]

[Math Processing Error]

(5)

Finalize the statement

[Math Processing Error]

Close database connection

[Math Processing Error]

Compatibility

• 

The Database[SQLite][Step] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

Database[SQLite][Finalize]

Database[SQLite][Prepare]

 


Download Help Document