]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/db/dbtest.cpp
2.8.0
[wxWidgets.git] / samples / db / dbtest.cpp
index c999c7019cbd286c3c22d321ce6b3be5792f8df5..211f6ca7c3b3fafa69384c09b39e48a13ff57898 100644 (file)
  *  SYNOPSIS END
  */
 
  *  SYNOPSIS END
  */
 
-#ifdef __GNUG__
-#pragma implementation "dbtest.h"
-#endif
-
 #include  "wx/wxprec.h"
 
 #ifdef    __BORLANDC__
 #include  "wx/wxprec.h"
 
 #ifdef    __BORLANDC__
@@ -616,6 +612,22 @@ void CheckSupportForAllDataTypes(wxDb *pDb)
         wxLogMessage(nativeDataTypeName);
     }
 #endif
         wxLogMessage(nativeDataTypeName);
     }
 #endif
+#ifdef SQL_WVARCHAR
+    if (DataTypeSupported(pDb,SQL_WVARCHAR, &nativeDataTypeName))
+    {
+        nativeDataTypeName = wxT("SQL_WVARCHAR (") + nativeDataTypeName;
+        nativeDataTypeName += wxT(")\n");
+        wxLogMessage(nativeDataTypeName);
+    }
+#endif
+#ifdef SQL_WCHAR
+    if (DataTypeSupported(pDb,SQL_WCHAR, &nativeDataTypeName))
+    {
+        nativeDataTypeName = wxT("SQL_WCHAR (") + nativeDataTypeName;
+        nativeDataTypeName += wxT(")\n");
+        wxLogMessage(nativeDataTypeName);
+    }
+#endif
 
     wxLogMessage(wxT("Done\n"));
 }  // CheckSupportForAllDataTypes()
 
     wxLogMessage(wxT("Done\n"));
 }  // CheckSupportForAllDataTypes()
@@ -1452,7 +1464,8 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
                        /* const wxString &orderBy       */ wxT("NAME"),
                        /* wxDb           *pDb           */ wxGetApp().READONLY_DB,
                        /* const wxString &defDir        */ wxGetApp().DbConnectInf->GetDefaultDir(),
                        /* const wxString &orderBy       */ wxT("NAME"),
                        /* wxDb           *pDb           */ wxGetApp().READONLY_DB,
                        /* const wxString &defDir        */ wxGetApp().DbConnectInf->GetDefaultDir(),
-                       /* bool            distinctValues*/ true);
+                       /* bool            distinctValues*/ true,
+                       wxEmptyString, 20);
 
         if (ListDB_Selection && wxStrlen(ListDB_Selection))
         {
 
         if (ListDB_Selection && wxStrlen(ListDB_Selection))
         {
@@ -1484,7 +1497,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
         if (wxGetApp().Contact->GetDb()->Catalog(wxEmptyString, wxT("catalog.txt")))
             wxMessageBox(wxT("The file 'catalog.txt' was created."));
         else
         if (wxGetApp().Contact->GetDb()->Catalog(wxEmptyString, wxT("catalog.txt")))
             wxMessageBox(wxT("The file 'catalog.txt' was created."));
         else
-            wxMessageBox(wxT("Creation of the file 'catalog.txt' was failed."));
+            wxMessageBox(wxT("Creation of the file 'catalog.txt' failed."));
         return;
     }
 
         return;
     }
 
@@ -1699,7 +1712,7 @@ bool CeditorDlg::Initialize()
 
 void CeditorDlg::OnSelectPict()
 {
 
 void CeditorDlg::OnSelectPict()
 {
-    wxFileDialog dlg(this, wxT("Choose an image file less than 60K"), wxEmptyString, wxEmptyString, wxT("JPEG files (*.jpg)|*.jpg|GIF files (*.gif)|*.gif|BMP files (*.bmp)|*.bmp|All Files (*.*)|*.*"), wxOPEN);
+    wxFileDialog dlg(this, wxT("Choose an image file less than 60K"), wxEmptyString, wxEmptyString, wxT("JPEG files (*.jpg)|*.jpg|GIF files (*.gif)|*.gif|BMP files (*.bmp)|*.bmp|All Files (*.*)|*.*"), wxFD_OPEN);
 
     if (dlg.ShowModal() == wxID_OK)
     {
 
     if (dlg.ShowModal() == wxID_OK)
     {
@@ -2906,7 +2919,7 @@ m_pImage(NULL)
 
         if(m_pImage->Ok())
         {
 
         if(m_pImage->Ok())
         {
-            m_pBmp = new wxBitmap(m_pImage);
+            m_pBmp = new wxBitmap(*m_pImage);
             m_pDisplayBmp = new wxStaticBitmap(this, IMAGE_DIALOG_STATIC_BMP, *m_pBmp, wxPoint(5,5), wxDefaultSize);
 
             SetSize(m_pBmp->GetWidth() + 10, m_pBmp->GetHeight() + 30);
             m_pDisplayBmp = new wxStaticBitmap(this, IMAGE_DIALOG_STATIC_BMP, *m_pBmp, wxPoint(5,5), wxDefaultSize);
 
             SetSize(m_pBmp->GetWidth() + 10, m_pBmp->GetHeight() + 30);