]> git.saurik.com Git - wxWidgets.git/commitdiff
Unicode support added
authorGeorge Tasker <gtasker@allenbrook.com>
Thu, 4 Nov 2004 21:36:32 +0000 (21:36 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Thu, 4 Nov 2004 21:36:32 +0000 (21:36 +0000)
SQL_C_WXCHAR now used throughout the code

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

demos/dbbrowse/browsedb.cpp
demos/dbbrowse/doc.cpp

index c3761a761803a701e7741927ac4aa5ba8287d1ac..2efb6697664f190baa28bdd6497e3ca294efbe0a 100644 (file)
@@ -470,7 +470,7 @@ void BrowserDB::OnFillSqlTyp()
     i_SqlTyp[1]  = SQL_C_BINARY;    s_SqlTyp[1]  = _T("SQL_C_BINARY");
     i_SqlTyp[2]  = SQL_C_BIT;       s_SqlTyp[2]  = _T("SQL_C_BIT");
     i_SqlTyp[3]  = SQL_C_BOOKMARK;  s_SqlTyp[3]  = _T("SQL_C_BOOKMARK");
     i_SqlTyp[1]  = SQL_C_BINARY;    s_SqlTyp[1]  = _T("SQL_C_BINARY");
     i_SqlTyp[2]  = SQL_C_BIT;       s_SqlTyp[2]  = _T("SQL_C_BIT");
     i_SqlTyp[3]  = SQL_C_BOOKMARK;  s_SqlTyp[3]  = _T("SQL_C_BOOKMARK");
-    i_SqlTyp[4]  = SQL_C_CHAR;      s_SqlTyp[4]  = _T("SQL_C_CHAR");
+    i_SqlTyp[4]  = SQL_C_WXCHAR;    s_SqlTyp[4]  = _T("SQL_C_WXCHAR");
     i_SqlTyp[5]  = SQL_C_DATE;      s_SqlTyp[5]  = _T("SQL_C_DATE");
     i_SqlTyp[6]  = SQL_C_DEFAULT;   s_SqlTyp[6]  = _T("SQL_C_DEFAULT");
     i_SqlTyp[7]  = SQL_C_DOUBLE;    s_SqlTyp[7]  = _T("SQL_C_DOUBLE");
     i_SqlTyp[5]  = SQL_C_DATE;      s_SqlTyp[5]  = _T("SQL_C_DATE");
     i_SqlTyp[6]  = SQL_C_DEFAULT;   s_SqlTyp[6]  = _T("SQL_C_DEFAULT");
     i_SqlTyp[7]  = SQL_C_DOUBLE;    s_SqlTyp[7]  = _T("SQL_C_DOUBLE");
index 168e82461aedabf81e444e30dabfe633c0d09932..c8044d37a160a0adbfc322e42db45cb03605a118 100644 (file)
@@ -155,8 +155,8 @@ bool MainDoc::OnInitView()
 //----------------------------------------------------------------------------------------
 bool MainDoc::OnInitODBC()
 {
 //----------------------------------------------------------------------------------------
 bool MainDoc::OnInitODBC()
 {
-    wxChar Dsn[SQL_MAX_DSN_LENGTH + 1];
-    wxChar DsDesc[255]; // BJO20002501 instead of 512
+    wxChar Dsn[SQL_MAX_DSN_LENGTH+1];
+    wxChar DsDesc[254+1]; // BJO20002501 instead of 512
     Temp0 = _T("");
     i_DSN = 0;       // Counter
     int i;
     Temp0 = _T("");
     i_DSN = 0;       // Counter
     int i;
@@ -169,14 +169,14 @@ bool MainDoc::OnInitODBC()
     }
 
     //---------------------------------------------------------------------------------------
     }
 
     //---------------------------------------------------------------------------------------
-    const char sep = 3; // separator character used in string between DSN ans DsDesc
+    const wxChar sep = 3; // separator character used in string between DSN and DsDesc
     wxSortedArrayString s_SortDSNList, s_SortDsDescList;
     // BJO-20000127
     // In order to have same sort result on both Dsn and DsDesc, create a 'keyed' string.
     // The key will be removed after sorting
     wxString KeyString;
     //---------------------------------------------------------------------------------------
     wxSortedArrayString s_SortDSNList, s_SortDsDescList;
     // BJO-20000127
     // In order to have same sort result on both Dsn and DsDesc, create a 'keyed' string.
     // The key will be removed after sorting
     wxString KeyString;
     //---------------------------------------------------------------------------------------
-    while(wxDbGetDataSource(DbConnectInf.GetHenv(), Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc)))
+    while (wxDbGetDataSource(DbConnectInf.GetHenv(), Dsn, SQL_MAX_DSN_LENGTH, DsDesc, 254))
     {
         i_DSN++;   // How many Dsn have we ?
         KeyString.Printf(_T("%s%c%s"),Dsn, sep, DsDesc);
     {
         i_DSN++;   // How many Dsn have we ?
         KeyString.Printf(_T("%s%c%s"),Dsn, sep, DsDesc);