All pastes #920326 Raw Edit

Someone

public text v1 · immutable
#920326 ·published 2008-02-27 10:36 UTC
rendered paste body
Index: Field.cpp
===================================================================
--- Field.cpp	(revision 5321)
+++ Field.cpp	(working copy)
@@ -66,11 +66,11 @@
 void Field::SetValue(const char *value)
 {
     if(mValue) delete [] mValue;
-#ifndef DO_POSTGRESQL
+//#ifndef DO_POSTGRESQL
     if (value)
-#else
-    if (*value)
-#endif
+//#else
+//    if (*value)
+//#endif
     {
         mValue = new char[strlen(value) + 1];
         strcpy(mValue, value);
@@ -83,11 +83,11 @@
 {
     if(mName) delete [] mName;
 
-#ifndef DO_POSTGRESQL
+//#ifndef DO_POSTGRESQL
     if (name)
-#else
-    if (*name)
-#endif
+//#else
+//    if (*name)
+//#endif
     {
         mName = new char[strlen(name) + 1];
         strcpy(mName, name);
Index: QueryResultPostgre.cpp
===================================================================
--- QueryResultPostgre.cpp	(revision 5321)
+++ QueryResultPostgre.cpp	(working copy)
@@ -52,7 +52,7 @@
 
     for (int j = 0; j < mFieldCount; j++)
     {
-        mCurrentRow[j].SetValue(PQgetvalue(mResult, mTableIndex, j));
+        mCurrentRow[j].SetValue(&(PQgetvalue(mResult, mTableIndex, j)));
     }
     mTableIndex++;