Exemple #1
0
func (stmt *Statement) NumRows() (int, *ODBCError) {
	var NOR C.SQLLEN
	ret := C.SQLRowCount(C.SQLHSTMT(stmt.handle), &NOR)
	if !Success(ret) {
		err := FormatError(C.SQL_HANDLE_STMT, stmt.handle)
		return -1, err
	}
	return int(NOR), nil
}
Exemple #2
0
func (stmt *Statement) RowsAffected() (int, *ODBCError) {
	var nor C.SQLLEN
	ret := C.SQLRowCount(C.SQLHSTMT(stmt.handle), &nor)
	if !Success(ret) {
		err := FormatError(C.SQL_HANDLE_STMT, stmt.handle)
		return -1, err
	}
	return int(nor), nil
}
Exemple #3
0
func SQLRowCount(statementHandle SQLHSTMT, rowCountPtr *SQLLEN) (ret SQLRETURN) {
	r := C.SQLRowCount(C.SQLHSTMT(statementHandle), (*C.SQLLEN)(rowCountPtr))
	return SQLRETURN(r)
}