]> git.saurik.com Git - wxWidgets.git/commitdiff
wxODBC_BLOB_SUPPORT changed to just being a #define.
authorGeorge Tasker <gtasker@allenbrook.com>
Wed, 12 May 2004 14:03:23 +0000 (14:03 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Wed, 12 May 2004 14:03:23 +0000 (14:03 +0000)
BLOB support is on by default

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/db/dbtest.cpp
samples/db/dbtest.h

index 36d2d2604bf0d76af2d70046e711b6fc330e8857..3488f247a2d840f0bee70afbfcd99deaa175d5b2 100644 (file)
@@ -1027,6 +1027,7 @@ void Ccontact::Initialize()
     IsDeveloper        = FALSE;
     Contributions      = 0;
     LinesOfCode        = 0L;
+    wxStrcpy(Picture,"\xff\x01\xff\x02\xff\x03\xff\x04\xff\x05");
 }  // Ccontact::Initialize
 
 
@@ -1067,8 +1068,8 @@ void Ccontact::SetupColumns()
     SetColDefs ( 9,wxT("CONTRIBS"),   DB_DATA_TYPE_INTEGER,    &Contributions,  SQL_C_UTINYINT,             sizeof(Contributions),  FALSE,TRUE);
     SetColDefs (10,wxT("LINE_CNT"),   DB_DATA_TYPE_INTEGER,    &LinesOfCode,    SQL_C_ULONG,                sizeof(LinesOfCode),    FALSE,TRUE);
     SetColDefs (11,wxT("LANGUAGE"),   DB_DATA_TYPE_INTEGER,    &NativeLanguage, SQL_C_ENUM,                 sizeof(NativeLanguage), FALSE,TRUE);
-#if wxODBC_BLOB_EXPERIMENT > 0
-    SetColDefs (12,wxT("PICTURE"),    DB_DATA_TYPE_BLOB,        Picture,        SQL_C_BINARY,          sizeof(Picture),        FALSE,TRUE);
+#ifdef wxODBC_BLOB_SUPPORT
+    SetColDefs (12,wxT("PICTURE"),    DB_DATA_TYPE_BLOB,        Picture,        SQL_C_BINARY,               sizeof(Picture),        FALSE,TRUE);
 #endif
 }  // Ccontact::SetupColumns
 
index 4f8e032e5e7d2f4b8290c9d4c41fa5f0d372d4f9..0550e042b4de67e957363ba9f23e0db5cd0f425b 100644 (file)
@@ -41,14 +41,13 @@ enum    DialogModes {mView,mCreate,mEdit,mSearch};
 // Name of the table to be created/opened
 const wxChar     CONTACT_TABLE_NAME[]       = wxT("contacts");
 
-
-#define wxODBC_BLOB_EXPERIMENT 1
+#define wxODBC_BLOB_SUPPORT
 
 // Number of columns in the CONTACT table
-#if wxODBC_BLOB_EXPERIMENT > 0
-const int        CONTACT_NO_COLS            = 13;        // 0-12
+#ifdef wxODBC_BLOB_SUPPORT
+    const int        CONTACT_NO_COLS            = 13;        // 0-12
 #else
-const int        CONTACT_NO_COLS            = 12;        // 0-11
+    const int        CONTACT_NO_COLS            = 12;        // 0-11
 #endif
 
 const wxChar     PARAM_FILENAME[]           = wxT("dbtest.cfg");
@@ -85,9 +84,7 @@ class CstructContact : public wxObject
         wxChar             Country[20+1];
         TIMESTAMP_STRUCT   JoinDate;            // Date on which this person joined the wxWindows project
         Language           NativeLanguage;      // Enumerated type indicating person's native language
-#if wxODBC_BLOB_EXPERIMENT > 0
         wxChar             Picture[50000];
-#endif
         bool               IsDeveloper;         // Is this person a developer for wxWindows, or just a subscriber
         UCHAR              Contributions;       // Something to show off an integer field
         ULONG              LinesOfCode;         // Something to show off a 'long' field