diff --git a/src/interfaces/odbc/environ.c b/src/interfaces/odbc/environ.c
index 6de5c50c4e3da921d7de725179d07b2abdac2673..7c8f80dd8f22ea96017d5ad460e0cae6e60b8445 100644
--- a/src/interfaces/odbc/environ.c
+++ b/src/interfaces/odbc/environ.c
@@ -281,6 +281,9 @@ PGAPI_StmtError(	HSTMT hstmt,
 			case STMT_INVALID_OPTION_IDENTIFIER:
 				strcpy(szSqlState, "HY092");
 				break;
+			case STMT_OPTION_NOT_FOR_THE_DRIVER:
+				strcpy(szSqlState, "HYC00");
+				break;
 			case STMT_EXEC_ERROR:
 			default:
 				strcpy(szSqlState, "S1000");
diff --git a/src/interfaces/odbc/options.c b/src/interfaces/odbc/options.c
index d560ff46705e68fd034ab16779ce8d1305b3572e..ab974c3cd0047f34ae2979604e08ad4fdfb09e6a 100644
--- a/src/interfaces/odbc/options.c
+++ b/src/interfaces/odbc/options.c
@@ -209,6 +209,19 @@ set_statement_option(ConnectionClass *conn,
 				conn->stmtOptions.use_bookmarks = vParam;
 			break;
 
+		case 1227:
+		case 1228:
+			if (stmt)
+			{
+				stmt->errornumber = STMT_OPTION_NOT_FOR_THE_DRIVER;
+				stmt->errormsg = "The option may be for MS SQL Server(Set)";
+			}
+			else if (conn)
+			{
+				conn->errornumber = STMT_OPTION_NOT_FOR_THE_DRIVER;
+				conn->errormsg = "The option may be for MS SQL Server(Set)";
+			}
+			return SQL_ERROR;
 		default:
 			{
 				char		option[64];
diff --git a/src/interfaces/odbc/qresult.h b/src/interfaces/odbc/qresult.h
index 1bf1ce93b742f24d03f4b92fa6c791ee63948bf7..b313cbc467cb6058283ad61ad79fd535716e93b8 100644
--- a/src/interfaces/odbc/qresult.h
+++ b/src/interfaces/odbc/qresult.h
@@ -102,6 +102,7 @@ struct QResultClass_
 
 /* status macros */
 #define QR_command_successful(self)			( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_NONFATAL_ERROR || self->status == PGRES_FATAL_ERROR))
+#define QR_command_maybe_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_FATAL_ERROR))
 #define QR_command_nonfatal(self)			( self->status == PGRES_NONFATAL_ERROR)
 #define QR_end_tuples(self)					( self->status == PGRES_END_TUPLES)
 #define QR_set_status(self, condition)		( self->status = condition )
diff --git a/src/interfaces/odbc/results.c b/src/interfaces/odbc/results.c
index 517d5a234d1c99b8b9c91eadbd96e7087fdcb77e..5f78ba936adae694a0f4b58e32724cb8bcc0c673 100644
--- a/src/interfaces/odbc/results.c
+++ b/src/interfaces/odbc/results.c
@@ -628,7 +628,7 @@ inolog("COLUMN_NULLABLE=%d\n", value);
 			break;
 
 		case SQL_COLUMN_OWNER_NAME: /* == SQL_DESC_SCHEMA_NAME */
-			p = "";
+			p = fi && (fi->ti) ? fi->ti->schema : "";
 			break;
 
 		case SQL_COLUMN_PRECISION: /* in 2.x */
@@ -744,6 +744,10 @@ inolog("COLUMN_TYPE=%d\n", value);
 			value = (fi && !fi->name[0] && !fi->alias[0]) ? SQL_UNNAMED : SQL_NAMED;
 			break;
 #endif /* ODBCVER */
+		case 1212:
+			stmt->errornumber = STMT_OPTION_NOT_FOR_THE_DRIVER;
+			stmt->errormsg = "this request may be for MS SQL Server";
+			return SQL_ERROR;
 		default:
 			stmt->errornumber = STMT_INVALID_OPTION_IDENTIFIER;
 			stmt->errormsg = "ColAttribute for this type not implemented yet";
@@ -1293,9 +1297,10 @@ PGAPI_ExtendedFetch(
 
 	/* increment the base row in the tuple cache */
 	QR_set_rowset_size(res, opts->rowset_size);
-	/* QR_inc_base(res, stmt->last_fetch_count); */
-	/* Is inc_base right ? */
-	res->base = stmt->rowset_start;
+	if (SC_is_fetchcursor(stmt))
+		QR_inc_base(res, stmt->last_fetch_count);
+	else
+		res->base = stmt->rowset_start;
 
 	/* Physical Row advancement occurs for each row fetched below */
 
diff --git a/src/interfaces/odbc/statement.h b/src/interfaces/odbc/statement.h
index 65fa088cb45fd76eac5b1eb05b8c4677ec9416cd..e0a01b7eab4d61fd6b9ff409ef4f3a4927ec01ba 100644
--- a/src/interfaces/odbc/statement.h
+++ b/src/interfaces/odbc/statement.h
@@ -79,6 +79,7 @@ typedef enum
 #define STMT_RETURN_NULL_WITHOUT_INDICATOR				29
 #define STMT_ERROR_IN_ROW						30
 #define STMT_INVALID_DESCRIPTOR_IDENTIFIER				31
+#define STMT_OPTION_NOT_FOR_THE_DRIVER					32
 
 /* statement types */
 enum