Truxton get database connection string

From truxwiki.com
Revision as of 11:09, 25 October 2021 by Sam (talk | contribs) (Created page with "Retrieves the connection string for the Truxton database. =Syntax= <source lang="C"> void truxton_get_database_connection_string( uint64_t truxton_handle, char * destination_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Retrieves the connection string for the Truxton database.

Syntax

void truxton_get_database_connection_string( uint64_t truxton_handle, char * destination_string, size_t max_size );

Parameters

truxton_handle

The handle created by the truxton_create call.

destination_string

The string to be written to.

max_size

The maximum number of characters that can be written to destination_string

Remarks

Use this API if you want to query the Truxton database directly.

Sample

void main()
{
    char connection_string[256];

    truxton_start();

    uint64_t truxton = truxton_create();

    truxton_get_database_connection_string( truxton, connection_string, sizeof(connection_string) );

    printf( "%s\n", connection_string);

    truxton_destroy( truxton );

    truxton_stop();
}