*** empty log message ***
[csql.git] / test / system / config / conftest2.c
blob555872d2a567ba81f3959edc3cf312a0c2620499
1 //print values of the config file
2 #include<CSql.h>
3 int main()
5 Connection conn;
6 DbRetVal rv = OK;
7 char *root = os::getenv("PWD");
8 char conf[512];
9 char *s = root + (strlen(root) - 9);
10 if (strcmp(s, "csql/test") == 0)
11 sprintf(conf, "%s/system/config/csql.conf", root);
12 else
13 sprintf(conf, "%s/csql.conf", root);
14 os::setenv("CSQL_CONFIG_FILE", conf);
15 rv = conn.open("root", "manager");
16 if (rv != OK) return 1;
17 Conf::config.print();
18 conn.close();
19 return 0;