mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Added strptime function to SQL parser as a feature. This is needed to i.e. be able to query time-fields in DB and to use dates <1.1.1970 and >19.1.2038. All changes should be backwards-compatible to not break existing queries.
This commit is contained in:
@@ -44,6 +44,8 @@ static SQLRETURN SQL_API _SQLAllocStmt(SQLHDBC hdbc, SQLHSTMT *phstmt);
|
||||
static SQLRETURN SQL_API _SQLFreeConnect(SQLHDBC hdbc);
|
||||
static SQLRETURN SQL_API _SQLFreeEnv(SQLHENV henv);
|
||||
static SQLRETURN SQL_API _SQLFreeStmt(SQLHSTMT hstmt, SQLUSMALLINT fOption);
|
||||
static SQLRETURN SQL_API _SQLPrepare(SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr);
|
||||
|
||||
|
||||
static void bind_columns (struct _hstmt*);
|
||||
static void unbind_columns (struct _hstmt*);
|
||||
@@ -1111,11 +1113,7 @@ static SQLRETURN SQL_API _SQLExecDirect(
|
||||
SQLCHAR *szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
struct _hstmt *stmt = (struct _hstmt *) hstmt;
|
||||
|
||||
TRACE("_SQLExecDirect");
|
||||
strcpy(stmt->query, (char*)szSqlStr);
|
||||
|
||||
_SQLPrepare(hstmt, szSqlStr, cbSqlStr);
|
||||
return _SQLExecute(hstmt);
|
||||
}
|
||||
|
||||
@@ -1362,7 +1360,7 @@ SQLRETURN SQL_API SQLNumResultCols(
|
||||
return SQL_SUCCESS;
|
||||
}
|
||||
|
||||
SQLRETURN SQL_API SQLPrepare(
|
||||
static SQLRETURN SQL_API _SQLPrepare(
|
||||
SQLHSTMT hstmt,
|
||||
SQLCHAR *szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
@@ -1378,6 +1376,14 @@ SQLRETURN SQL_API SQLPrepare(
|
||||
return SQL_SUCCESS;
|
||||
}
|
||||
|
||||
SQLRETURN SQL_API SQLPrepare(
|
||||
SQLHSTMT hstmt,
|
||||
SQLCHAR *szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
return _SQLPrepare(hstmt, szSqlStr, cbSqlStr);
|
||||
}
|
||||
|
||||
SQLRETURN SQL_API SQLRowCount(
|
||||
SQLHSTMT hstmt,
|
||||
SQLLEN *pcrow)
|
||||
|
||||
Reference in New Issue
Block a user