Hi Jaroslaw,

 I've attached the patch to cursor.cpp and the {mysql,pqxx}cursor.cpp , as we 
discussed a few days back on IRC. ( for the empty cells problem in mysql )

Shall I commit ?

Cheers!
 Sharan Rao
Index: cursor.cpp
===================================================================
--- cursor.cpp	(revision 766421)
+++ cursor.cpp	(working copy)
@@ -406,10 +406,10 @@
 					m_afterLast = true;
 //js					m_at = m_records_in_buf;
 					m_at = -1; //position is invalid now and will not be used
-					if ((FetchResult) m_result == FetchEnd) {
-						return false;
-					}
-					setError(ERR_CURSOR_RECORD_FETCHING, i18n("Cannot fetch next record."));
+//					if ((FetchResult) m_result == FetchEnd) {
+//						return false;
+//					}
+//sr					setError(ERR_CURSOR_RECORD_FETCHING, i18n("Cannot fetch next record."));
 					return false;
 				}
 				//we have a record: store this record's values in the buffer
Index: drivers/mySQL/mysqlcursor.cpp
===================================================================
--- drivers/mySQL/mysqlcursor.cpp	(revision 766421)
+++ drivers/mySQL/mysqlcursor.cpp	(working copy)
@@ -102,7 +102,9 @@
 		m_result = FetchEnd;
 	}
 	else {
-		m_result = FetchError;
+		// control will reach here only when at() < 0 ( which is usually -1 )
+		// -1 is same as "1 beyond the End"
+		m_result = FetchEnd;
 	}
 }
 
Index: drivers/pqxx/pqxxcursor.cpp
===================================================================
--- drivers/pqxx/pqxxcursor.cpp	(revision 766421)
+++ drivers/pqxx/pqxxcursor.cpp	(working copy)
@@ -166,7 +166,9 @@
 	}
 	else
 	{
-		m_result = FetchError;
+		// control will reach here only when at() < 0 ( which is usually -1 )
+		// -1 is same as "1 beyond the End"
+		m_result = FetchEnd;
 	}
 }
 
_______________________________________________
Kexi mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kexi

Reply via email to