Skip to content

Commit 9d9b0e2

Browse files
committed
ODBC changes
1 parent 91cb6bd commit 9d9b0e2

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

source/ddbc/drivers/odbcddbc.d

+23-22
Original file line numberDiff line numberDiff line change
@@ -1430,28 +1430,29 @@ version (USE_ODBC)
14301430

14311431
override bool first()
14321432
{
1433-
checkClosed();
1434-
lock();
1435-
scope (exit)
1436-
unlock();
1437-
1438-
// returns one of SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE
1439-
// see: https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlfetchscroll-function
1440-
SQLRETURN retcode = SQLFetchScroll(stmt.stmt, SQL_FETCH_FIRST, 0);
1441-
1442-
// switch (retcode) {
1443-
// case SQL_NO_DATA:
1444-
// return false;
1445-
// }
1446-
1447-
if(retcode != SQL_NO_DATA) {
1448-
currentRowIndex = 0;
1449-
return true;
1450-
1451-
} else {
1452-
// check(retcode, stmt.stmt, SQL_HANDLE_STMT);
1453-
return false;
1454-
}
1433+
return isFirst();
1434+
1435+
//checkClosed();
1436+
//lock();
1437+
//scope (exit)
1438+
// unlock();
1439+
//
1440+
//// returns one of SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE
1441+
//// see: https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlfetchscroll-function
1442+
//SQLRETURN retcode = SQLFetchScroll(stmt.stmt, SQL_FETCH_FIRST, 0);
1443+
//
1444+
//// switch (retcode) {
1445+
//// case SQL_NO_DATA:
1446+
//// return false;
1447+
//// }
1448+
//
1449+
//if(retcode != SQL_NO_DATA) {
1450+
// currentRowIndex = 0;
1451+
// return true;
1452+
//} else {
1453+
// // check(retcode, stmt.stmt, SQL_HANDLE_STMT);
1454+
// return false;
1455+
//}
14551456
}
14561457

14571458
override bool isFirst()

0 commit comments

Comments
 (0)