--- gda-util.c.orig	2008-02-25 14:09:21.000000000 -0500
+++ gda-util.c	2008-02-25 14:35:03.000000000 -0500
@@ -85,7 +85,7 @@
  * @string: string to escape
  *
  * Escapes @string to make it understandable by a DBMS. The escape method is very common and replaces any
- * occurence of "'" with "\'" and "\" with "\\".
+ * occurence of "'" with "''" and "\" with "\\"
  */
 gchar *
 gda_default_escape_string (const gchar *string)
@@ -111,7 +111,12 @@
 	ret = g_new0 (gchar, size);
 	retptr = ret;
 	while (*ptr) {
-		if ((*ptr == '\'') || (*ptr == '\\')) {
+		if (*ptr == '\'') {
+			*retptr = '\'';
+			*(retptr+1) = *ptr;
+			retptr += 2;
+		}
+		else if (*ptr == '\\') {
 			*retptr = '\\';
 			*(retptr+1) = *ptr;
 			retptr += 2;
