|
|
Parses a string containing DBMS-specific data.
Ns_PdParseOpenArgs(char *openargs, char **datasource,
char **user, char **password, char **param);
This function parses the datasource, user, password, and param parameters leaving missing elements as NULL. This function is normally called from within Ns_PdDbOpen.
/* Things italicized would be your DBMS-specific structures and
calls. */
void
Ns_PdDbOpen(void *handle, char *openArgs) {
DBMSState *state = (DBMSState *) handle;
Ns_PdParseOpenArgs(openArgs, &state->datasource,
&state->user, &state->password, &state->param);
/* ... */
}