37 Error(
"TRDBCServer",
"connection to %s failed", db);
49 if (IsConnected())
Close();
70 Error(
"Query",
"not connected");
84 if(!IsConnected())
return 0;
88 TString query =
"USE ";
91 if(!stmt->
Execute(query))
return 0;
103 if (!IsConnected()) {
104 Error(
"GetDataBases",
"not connected");
111 query=
"show databases";
112 if(wild) { query +=
" like "; query += wild; }
126 if (!IsConnected()) {
127 Error(
"GetTables",
"not connected");
134 query =
"SHOW TABLES";
138 Error(
"GetTables",
"no such database %s", dbname);
141 query +=
" from "; query += dbname;
144 if(wild) { query +=
" like "; query += wild; }
160 if (!IsConnected()) {
161 Error(
"GetColumns",
"not connected");
168 Error(
"GetColumns",
"no such database %s", dbname);
173 query =
"SHOW COLUMNS FROM ";
176 if (wild) { query +=
" LIKE "; query += wild; }
188 if (!IsConnected()) {
189 Error(
"CreateDataBase",
"not connected");
197 query =
"CREATE DATABASE ";
211 if (!IsConnected()) {
212 Error(
"DropDataBase",
"not connected");
220 query =
"DROP DATABASE ";
235 if (!IsConnected()) {
236 Error(
"Reload",
"not connected");
245 res = stmt->
Execute(
"FLUSH PRIVILEGES");
259 if (!IsConnected()) {
260 Error(
"Shutdown",
"not connected");
275 if (!IsConnected()) {
276 Error(
"ServerInfo",
"not connected");
285 rs =
Query(
"SELECT VERSION()");
286 if(!rs)
return str.Data();
288 if(!rs->
Next())
return str.Data();