2.1.25.57 okutil_get_ODBC_data_sources


Description

Populates a StringArray (or vector<string>) containing the names of ODBC datasources. Optionally populates a StringArray (or vector<string>) containing the names of ODBC drivers associated with the datasources. Returns number of drivers found.

Syntax

int okutil_get_ODBC_data_sources(StringArray* psaDataSources, StringArray* psaDrivers = NULL);

Parameters

psaDataSources
[output] pointer to a StringArray (or vector<string>) to populate with datasource names.
psaDrivers
[output]Optional. pointer to a StringArray (or vector<string>) to populate with driver names.

Return

Number of drivers found.

Examples

EX1

#include <Origin.h>
#include <outils.h>

void dump_datasources()
{
	vector<string> vs1, vs2;
	int num = okutil_get_ODBC_data_sources(&vs1, &vs2);
	for (int i = 0; i < num; i++)
	{
		printf("%s\t%s\n", vs1[i], vs2[i]);
	}
}

Remark

See Also

Header to Include

origin.h

outils.h

Reference