1651 |
|
|
1652 |
void InstrumentsDb::BindTextParam(sqlite3_stmt* pStmt, int Index, String Text) { |
void InstrumentsDb::BindTextParam(sqlite3_stmt* pStmt, int Index, String Text) { |
1653 |
if (pStmt == NULL) return; |
if (pStmt == NULL) return; |
1654 |
int res = sqlite3_bind_text(pStmt, Index, Text.c_str(), -1, SQLITE_STATIC); |
int res = sqlite3_bind_text(pStmt, Index, Text.c_str(), -1, SQLITE_TRANSIENT); |
1655 |
if (res != SQLITE_OK) { |
if (res != SQLITE_OK) { |
1656 |
sqlite3_finalize(pStmt); |
sqlite3_finalize(pStmt); |
1657 |
throw Exception("DB error: " + ToString(sqlite3_errmsg(db))); |
throw Exception("DB error: " + ToString(sqlite3_errmsg(db))); |