-1
VS2013을 사용하는 mySQL 테이블에서 DATETIME 값을 읽을 수 없습니다.C++에서 mySQL DATETIME 값 가져 오기
sql::mysql::MySQL_Driver* m_driver;
sql::Connection* m_conn;
sql::Statement* m_stmt;
sql::ResultSet* m_res;
m_driver = sql::mysql::get_driver_instance();
m_conn = m_driver->connect(ch_hostName, ch_userName, ch_pwd);
m_stmt = m_conn->createStatement();
m_res = m_stmt->executeQuery("select tip, id1, datum from recordLocker where id1 = 'A0001' and tip = 1");
try
{
m_res->getString("datum");
}
catch (sql::SQLException& e)
{
TRACE1("\nSQL Error %d\n", e.getErrorCode());
}
내가 "SQL 오류 0"에 geting있어
: 나는 MySQL의 커넥터-1.1.9-win32에서 사용하고
(mysqlcppconn.lib는) 다음
this is the row containing the datas
m_res->getInt64("datum");
m_res->getUInt64("datum");
(m_res가 비어 있지).
도움 주셔서 감사합니다.
'DATETIME'이 문자열이나 정수 값도이다. – user0042
sql :: ResultSet에 getDateTime() 함수가 없습니다. 이것이 제 문제입니다. – janos