<< DbFetchStruct SciDb DbFuzzyUpdateCreate >>

SciDb >> SciDb > DbFirst

DbFirst

set a result handler pointer to first result in the set

Calling Sequence

DbFirst(resultHandler)

Parameters

resultHandler

a pointer to object of result (returned by DbQuery())

Description

DbFirst(resultHandler) sets a result handler pointer to first result in the set.

Examples

// Opens a “PostgreSQL” connection with a connexion string
dblink = DbConnect("PSQL", ..
"Server=127.0.0.1;Database=myDataBase;User Id=myUsername;Password=myPassword;");

resultHandler = DbQuery('SELECT * FROM addressbook');

//get the first record in result as a struct
recordStruct = DbFetchStruct(resultHandler);
//if we now want to get the same, first result, we must set a result pointer to the first result
DbFirst(resultHandler);
//now getting the first record as matrix of strings
recordStrings = DbFetchString(resultHandler);

//Disconnect from default (the last) database myDataBase
DbDisconnect();

See Also

Authors


Report an issue
<< DbFetchStruct SciDb DbFuzzyUpdateCreate >>