[fdo-commits] r692 - in trunk/Providers/GenericRdbms/Src/UnitTest: Common MySql Odbc

svn_fdo at osgeo.org svn_fdo at osgeo.org
Fri Jan 26 17:18:18 EST 2007


Author: brentrobinson
Date: 2007-01-26 17:18:18 -0500 (Fri, 26 Jan 2007)
New Revision: 692

Modified:
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/DescribeSchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAdvancedSelectTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationDeleteTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationInsertTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSelectTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationUpdateTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoCapabilityTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConnectTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConstraintsTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDatastoreTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoMultiThreadTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaRollbackTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSqlCmdTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/GeometryTests.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/SelectTests.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.h
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoApplySchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoForeignSchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlSchemaMgrTests.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcDescribeSchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoConnectTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoDeleteTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoInsertTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoMultiThreadTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSchemaTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSqlCmdTest.cpp
   trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoUpdateTest.cpp
Log:
Merged change 626 from 3.2.x branch

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -44,7 +44,6 @@
     m_rdbi_context(NULL),
     m_gdbi_conn(NULL)
 {
-    mDatastore[0] = 0;
 }
 
 StaticConnection::~StaticConnection (void)
@@ -52,9 +51,9 @@
     disconnect();
 }
 
-void StaticConnection::SetSchema ( char* suffix ) 
+void StaticConnection::SetSchema ( FdoString* suffix ) 
 {
-    sprintf( mDatastore, "%s%s", UnitTestUtil::GetEnviron( "datastore" ), suffix );
+    mDatastore = UnitTestUtil::GetEnviron("datastore", suffix );
     FdoStringP strDatastore = mDatastore;
     if (m_rdbi_context->dispatch.capabilities.supports_unicode == 1)
         ::rdbi_set_schemaW( m_rdbi_context, strDatastore );
@@ -255,24 +254,39 @@
 
 }
 
-wchar_t *ConnectionUtil::GetConnectionString(StringConnTypeRequest pTypeReq, const char *suffix)
+wchar_t *ConnectionUtil::GetConnectionString(StringConnTypeRequest pTypeReq, FdoString *suffix)
 {
-    char *service = UnitTestUtil::GetEnviron("service");
-    char *username = UnitTestUtil::GetEnviron("username");
-    char *password = UnitTestUtil::GetEnviron("password");
-    char *datastore = UnitTestUtil::GetEnviron("datastore", suffix);
+    FdoStringP service = UnitTestUtil::GetEnviron("service");
+    FdoStringP username = UnitTestUtil::GetEnviron("username");
+    FdoStringP password = UnitTestUtil::GetEnviron("password");
+    FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", suffix);
 	
 	static wchar_t connectString[200];
 	connectString[0] = L'\0';
 
     if (Connection_WithDatastore == pTypeReq)
-        swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"service=%hs;username=%hs;password=%hs;datastore=%hs", service, username ? username : "", password ? password : "", datastore);
+        swprintf( connectString, 
+            sizeof(connectString)/sizeof(wchar_t), 
+            L"service=%ls;username=%ls;password=%ls;datastore=%ls", 
+            (FdoString*) service, 
+            (FdoString*) username, 
+            (FdoString*) password, 
+            (FdoString*) datastore
+        );
 	else
-        swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"service=%hs;username=%hs;password=%hs;", service, username ? username : "", password ? password : "");
+        swprintf( 
+            connectString, 
+            sizeof(connectString)/sizeof(wchar_t), 
+            L"service=%ls;username=%ls;password=%ls;", 
+            (FdoString*) service, 
+            (FdoString*) username, 
+            (FdoString*) password
+        );
+
 	return connectString;
 }
 
-const char* ConnectionUtil::GetEnviron(const char *name, const char *suffix)
+FdoStringP ConnectionUtil::GetEnviron(const char *name, FdoString *suffix)
 {
     static char    uname [1024];
     int   size=1024;
@@ -281,40 +295,44 @@
 
     if (_stricmp(name, "service") == 0)
     {
-        return getenv("service");
+        return GetEnv("service");
     }
     else if (_stricmp(name, "username") == 0)
     {
-        return getenv("username");
+        return GetEnv("username");
     }
     else if (_stricmp(name, "password") == 0)
     {
-        return getenv("password");
+        return GetEnv("password");
     }
     else if (_stricmp(name, "datastore") == 0)
     {
-        static char source[128];
-        char *datastore = getenv("datastore");
+        FdoStringP source;
+        FdoStringP datastore = GetEnv("datastore");
         if (datastore == NULL)
-            sprintf(source, "fdo_%s", uname);
+            source = FdoStringP::Format( L"fdo_%hs", uname);
         else
-            strcpy(source, datastore);
-        strcat(source, suffix);
+            source = datastore;
+        source = source + suffix;
 		if (GetSuffixTest() != NULL)
-			strcat(source, GetSuffixTest());
+			source = source + GetSuffixTest();
         return source;
     }
     else if (_stricmp(name, "provider") == 0)
     {
-        static char provider[128];
-        char *prov = getenv("provider");
-        if (prov != NULL )
-            strcpy(provider, prov);
+        FdoStringP provider = GetEnv("provider");
         return provider;
     }
     else if (_stricmp(name, "dsnname") == 0)
     {
-        return getenv("dsnname");
+        return GetEnv("dsnname");
     }
-    return NULL;
+    return L"";
 }
+
+FdoStringP ConnectionUtil::GetEnv(const char* name)
+{
+    const char* env = getenv( name );
+
+    return env;
+}

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/ConnectionUtil.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -47,7 +47,7 @@
         return NULL;
     }
 
-    virtual void SetSchema ( char* suffix );
+    virtual void SetSchema ( FdoString* suffix );
 
 protected:
     void init ();
@@ -59,7 +59,7 @@
 
     rdbi_context_def *m_rdbi_context;
     GdbiConnection* m_gdbi_conn;
-    char mDatastore[100];
+    FdoStringP mDatastore;
 };
 
 
@@ -68,8 +68,9 @@
 public:
 	ConnectionUtil(void);
 
-	virtual wchar_t *GetConnectionString(StringConnTypeRequest pTypeReq = Connection_WithDatastore, const char *suffix = "");
-	virtual const char *GetEnviron( const char *name, const char *suffix = "" );
+	virtual wchar_t *GetConnectionString(StringConnTypeRequest pTypeReq = Connection_WithDatastore, FdoString *suffix = L"");
+	virtual FdoStringP GetEnviron( const char *name, FdoString *suffix = L"" );
+    virtual FdoStringP GetEnv( const char* name );
 	virtual StaticConnection* NewStaticConnection() = 0;
 	virtual void SetProvider( const char *providerName ) = 0;
 	virtual FdoInsertTest* GetInsertTest () = 0;

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -42,7 +42,7 @@
         {
 	        try
             {
-		        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
                 FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
                 connection->SetConnectionString( userConnectString );
                 connection->Open();

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/DataTypeTests.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -21,7 +21,7 @@
 
 #include <Inc/Rdbi/proto.h>
 
-#define DB_SUFFIX "_rdbitest"
+#define DB_SUFFIX L"_rdbitest"
 
 class DataTypeTests :
     public CppUnit::TestCase

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/DescribeSchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/DescribeSchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/DescribeSchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -51,7 +51,7 @@
     FdoPtr<FdoIConnection> connection;
     try
     {
-        FdoIConnection* connection  = UnitTestUtil::GetConnection("", true);
+        FdoIConnection* connection  = UnitTestUtil::GetConnection(L"", true);
         FdoPtr<FdoIDescribeSchema>  pDescSchemaCmd = (FdoIDescribeSchema*) connection->CreateCommand(FdoCommandType_DescribeSchema);
         FdoFeatureSchemasP          fsc = pDescSchemaCmd->Execute();
 
@@ -81,7 +81,7 @@
         connection = UnitTestUtil::CreateConnection(
             true,
             true,
-            "_describeschema",
+            L"_describeschema",
             NULL,
             NULL,
             0
@@ -152,7 +152,7 @@
         UnitTestUtil::CloseConnection(
             connection,
             false,
-            "_describeschema"
+            L"_describeschema"
         );
 
     }

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAdvancedSelectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAdvancedSelectTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAdvancedSelectTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -46,7 +46,7 @@
 {
     try
     {
-        mConnection = (FdoIConnection *) UnitTestUtil::GetConnection("", true);
+        mConnection = (FdoIConnection *) UnitTestUtil::GetConnection(L"", true);
 
     }
     catch (FdoException *ex)

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -22,15 +22,15 @@
 #include <Sm/Ph/Rd/DbObjectReader.h>
 #include "../SchemaMgr/Ph/Owner.h"
 
-char*    FdoApplySchemaTest::DB_NAME_SUFFIX                    = "_apply_schema";
-char*    FdoApplySchemaTest::DB_NAME_COPY_SUFFIX               = "_apply_copy";
-char*    FdoApplySchemaTest::DB_NAME_OVERRIDE_SUFFIX           = "_apply_override";
-char*    FdoApplySchemaTest::DB_NAME_OVERRIDE_DEFAULT_SUFFIX   = "_apply_overridedef";
-char*    FdoApplySchemaTest::DB_NAME_FOREIGN_SUFFIX            = "_apply_foreign";
-char*    FdoApplySchemaTest::DB_NAME_CONFIG_SUFFIX             = "_apply_config";
+FdoString*    FdoApplySchemaTest::DB_NAME_SUFFIX                    = L"_apply_schema";
+FdoString*    FdoApplySchemaTest::DB_NAME_COPY_SUFFIX               = L"_apply_copy";
+FdoString*    FdoApplySchemaTest::DB_NAME_OVERRIDE_SUFFIX           = L"_apply_override";
+FdoString*    FdoApplySchemaTest::DB_NAME_OVERRIDE_DEFAULT_SUFFIX   = L"_apply_overridedef";
+FdoString*    FdoApplySchemaTest::DB_NAME_FOREIGN_SUFFIX            = L"_apply_foreign";
+FdoString*    FdoApplySchemaTest::DB_NAME_CONFIG_SUFFIX             = L"_apply_config";
 
-wchar_t* FdoApplySchemaTest::LT_NAME                           = L"ApplyTest";
-char*    FdoApplySchemaTest::DB_NAME_LT_SUFFIX                 = "_apply_lt";
+FdoString*    FdoApplySchemaTest::LT_NAME                           = L"ApplyTest";
+FdoString*    FdoApplySchemaTest::DB_NAME_LT_SUFFIX                 = L"_apply_lt";
 
 
 FdoPropertyValue* FdoApplySchemaTest::AddNewProperty( FdoPropertyValueCollection* propertyValues, const wchar_t *name )
@@ -434,8 +434,7 @@
         owner->Commit();
 
         // Create RDBMS-specific elements (such as filegroups on SQL Server, tablespaces on Oracle, etc):
-        wchar_t *wDatastore = NULL;
-        multibyte_to_wide(wDatastore, UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX));
+        FdoStringP wDatastore = UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX);
         CreateRdbmsSpecificElements(connection, wDatastore);
 
 		// The following tests must be run in the following order to get the expected results.
@@ -527,8 +526,8 @@
         UnitTestUtil::Sql2Db( 
             FdoStringP::Format( 
                         L"grant select on %ls.storage to %ls",
-                        (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX)),
-                        (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX))
+                        (FdoString*) UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX),
+                        (FdoString*) UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX)
                     ),
                     connection
                 );
@@ -536,8 +535,8 @@
         UnitTestUtil::Sql2Db( 
             FdoStringP::Format( 
                         L"grant select on %ls.oneforeign to %ls",
-                        (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX)),
-                        (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX))
+                        (FdoString*) UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX),
+                        (FdoString*) UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX)
                     ),
                     connection
                 );
@@ -553,8 +552,8 @@
         UnitTestUtil::Sql2Db( 
             FdoStringP::Format( 
                         L"grant select on %ls.storage_floor to %ls",
-                        (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX)),
-                        (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX))
+                        (FdoString*) UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX),
+                        (FdoString*) UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX)
             ),
             connection
         );
@@ -628,7 +627,7 @@
         fdoClasses->RemoveAt( fdoClasses->IndexOf(L"view_op") );
 
         FdoRdbmsOvSchemaMappingP mapping = (FdoRdbmsOvPhysicalSchemaMapping*) mappings->GetItem( connection, pSchema->GetName());
-        ShemaOvSetOwner(mapping, FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX)) );
+        ShemaOvSetOwner(mapping, UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX) );
 
         // Apply the foreign schema
         FdoPtr<FdoIApplySchema>  pApplyCmd = (FdoIApplySchema*) connection->CreateCommand(FdoCommandType_ApplySchema);
@@ -769,8 +768,7 @@
         staticConn->SetSchema( DB_NAME_OVERRIDE_DEFAULT_SUFFIX );
 
         // Create RDBMS-specific elements (such as filegroups on SQL Server, tablespaces on Oracle, etc):
-        wchar_t *wDatastore = NULL;
-        multibyte_to_wide(wDatastore, UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_DEFAULT_SUFFIX));
+        FdoStringP wDatastore = UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_DEFAULT_SUFFIX);
         CreateRdbmsSpecificElements(connection, wDatastore);
 
 		// The following tests must be run in the following order to get the expected results.
@@ -892,7 +890,7 @@
 		);
 
 		// Compare output files with expected results.
-	    FdoStringP provider = UnitTestUtil::GetEnviron("provider","");
+	    FdoStringP provider = UnitTestUtil::GetEnviron("provider");
    		UnitTestUtil::CheckOutput( 
             "apply_schema_overrides_err1_master.txt",
             UnitTestUtil::GetOutputFileName( L"apply_schema_overrides_err1.txt" )
@@ -1785,7 +1783,7 @@
 	   with this name.
      */
 
-    datastoreName = FdoStringP::Format( L"%hs", UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX ) ).Upper();
+    datastoreName = UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX ).Upper();
     if ( mIsLowerDatastoreName ) 
         datastoreName = datastoreName.Lower();
 
@@ -4437,7 +4435,7 @@
     FdoPropertiesP(pClass->GetProperties())->Add( pProp );
 
     FdoOracleOvSchemaMappingP mapping = FdoOracleOvPhysicalSchemaMapping::Create( L"ForeignError");
-    mapping->SetOwner( FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX)) );
+    mapping->SetOwner( UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX) );
 
     pCmd->SetFeatureSchema( pSchema );
     pCmd->SetPhysicalMapping( mapping );

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -197,15 +197,15 @@
     FdoStringP mDatastore;
 	bool mIsLowerDatastoreName;
 
-    static char*      DB_NAME_SUFFIX;
-    static char*      DB_NAME_COPY_SUFFIX;
-    static char*      DB_NAME_OVERRIDE_SUFFIX;
-    static char*      DB_NAME_OVERRIDE_DEFAULT_SUFFIX;
-    static char*      DB_NAME_FOREIGN_SUFFIX;
-    static char*      DB_NAME_CONFIG_SUFFIX;
+    static FdoString*      DB_NAME_SUFFIX;
+    static FdoString*      DB_NAME_COPY_SUFFIX;
+    static FdoString*      DB_NAME_OVERRIDE_SUFFIX;
+    static FdoString*      DB_NAME_OVERRIDE_DEFAULT_SUFFIX;
+    static FdoString*      DB_NAME_FOREIGN_SUFFIX;
+    static FdoString*      DB_NAME_CONFIG_SUFFIX;
 
-    static wchar_t*   LT_NAME;
-    static char*      DB_NAME_LT_SUFFIX;
+    static FdoString*      LT_NAME;
+    static FdoString*      DB_NAME_LT_SUFFIX;
 
 };
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationDeleteTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationDeleteTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationDeleteTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -18,7 +18,7 @@
 #include "FdoAssociationDeleteTest.h"
 #include "UnitTestUtil.h"
 
-#define DB_SUFFIX	"_assoc"
+#define DB_SUFFIX	L"_assoc"
 
 FdoAssociationDeleteTest::FdoAssociationDeleteTest(void)
 {

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationInsertTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationInsertTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationInsertTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "FdoAssociationInsertTest.h"
 #include "UnitTestUtil.h"
 
-#define DB_SUFFIX	"_assoc"
+#define DB_SUFFIX	L"_assoc"
 
 static FdoPropertyValue* AddNewProperty( FdoPropertyValueCollection* propertyValues, const wchar_t *name )
 {

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "FdoAssociationSchemaTest.h"
 #include "UnitTestUtil.h"
 
-#define DB_SUFFIX	"_assoc"
+#define DB_SUFFIX	L"_assoc"
 
 FdoAssociationSchemaTest::FdoAssociationSchemaTest(void)
 {
@@ -45,13 +45,13 @@
 {
 	try
     {
-		FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, L"");
         FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
         connection->SetConnectionString( userConnectString );
         connection->Open();
 		FdoPtr<FdoIDestroyDataStore> pDelCmd = (FdoIDestroyDataStore*)connection->CreateCommand( FdoCommandType_DestroyDataStore );
 		FdoPtr<FdoIDataStorePropertyDictionary> dictionary = pDelCmd->GetDataStoreProperties();
-		dictionary->SetProperty( L"DataStore", FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_SUFFIX)) );
+		dictionary->SetProperty( L"DataStore", UnitTestUtil::GetEnviron("datastore", DB_SUFFIX) );
 		pDelCmd->Execute();
 		connection->Close();
     }

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSelectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSelectTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationSelectTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "FdoAssociationSelectTest.h"
 #include "UnitTestUtil.h"
 
-#define DB_SUFFIX	"_assoc"
+#define DB_SUFFIX	L"_assoc"
 
 FdoAssociationSelectTest::FdoAssociationSelectTest(void)
 {

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationUpdateTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationUpdateTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoAssociationUpdateTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "FdoAssociationUpdateTest.h"
 #include "UnitTestUtil.h"
 
-#define DB_SUFFIX	"_assoc"
+#define DB_SUFFIX	L"_assoc"
 
 FdoAssociationUpdateTest::FdoAssociationUpdateTest(void)
 {

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoCapabilityTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoCapabilityTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoCapabilityTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -65,7 +65,7 @@
 
     try {
 
-      connection = UnitTestUtil::GetConnection("", true);
+      connection = UnitTestUtil::GetConnection(L"", true);
 
 	  //const wchar_t **strings;
 	  //const wchar_t **strings2;
@@ -236,21 +236,21 @@
 //	    const wchar_t *value = dictionary->GetProperty(L"Username");
 //
 //#ifdef _WIN32
-//        dictionary->SetProperty(L"Username", (FdoStringP)UnitTestUtil::GetEnviron("username"));
+//        dictionary->SetProperty(L"Username", UnitTestUtil::GetEnviron("username"));
 //	    const wchar_t *password = dictionary->GetProperty(L"Password");
-//	    dictionary->SetProperty(L"Password", (FdoStringP)UnitTestUtil::GetEnviron("password"));
-//	    dictionary->SetProperty(L"DataStore", (FdoStringP)UnitTestUtil::GetEnviron("datastore"));
-//	    dictionary->SetProperty(L"Service", (FdoStringP)UnitTestUtil::GetEnviron("service"));
+//	    dictionary->SetProperty(L"Password", UnitTestUtil::GetEnviron("password"));
+//	    dictionary->SetProperty(L"DataStore", UnitTestUtil::GetEnviron("datastore"));
+//	    dictionary->SetProperty(L"Service", UnitTestUtil::GetEnviron("service"));
 //#else
-//	    wchar_t temp[128];
-//	    mbstowcs(temp, UnitTestUtil::GetEnviron("username"), sizeof(temp));
+//	    FdoStringP temp;
+//	    temp = UnitTestUtil::GetEnviron("username");
 //        dictionary->SetProperty(L"Username", temp);
 //	    const wchar_t *password = dictionary->GetProperty(L"Password");
-//	    mbstowcs(temp, UnitTestUtil::GetEnviron("password"), sizeof(temp));
+//	    temp = UnitTestUtil::GetEnviron("password");
 //	    dictionary->SetProperty(L"Password", temp);
-//	    mbstowcs(temp, UnitTestUtil::GetEnviron("datastore"), sizeof(temp));
+//	    temp = UnitTestUtil::GetEnviron("datastore");
 //	    dictionary->SetProperty(L"DataStore", temp);
-//	    mbstowcs(temp, UnitTestUtil::GetEnviron("service"), sizeof(temp));
+//	    temp = UnitTestUtil::GetEnviron("service");
 //	    dictionary->SetProperty(L"Service", temp);
 //
 //#endif
@@ -306,18 +306,18 @@
 	  FdoPtr<FdoIConnectionPropertyDictionary> dictionary = connectionInfo->GetConnectionProperties();
 
 #ifdef _WIN32
-      dictionary->SetProperty(L"Username", (FdoStringP)UnitTestUtil::GetEnviron("username"));
+      dictionary->SetProperty(L"Username", UnitTestUtil::GetEnviron("username"));
 	  const wchar_t *password = dictionary->GetProperty(L"Password");
-	  dictionary->SetProperty(L"Password", (FdoStringP)UnitTestUtil::GetEnviron("password"));
+	  dictionary->SetProperty(L"Password", UnitTestUtil::GetEnviron("password"));
 	  dictionary->SetProperty(L"Service", (FdoStringP)UnitTestUtil::GetEnviron("service"));
 #else
-	  wchar_t temp[128];
-	  mbstowcs(temp, UnitTestUtil::GetEnviron("username"), sizeof(temp));
+	  FdoStringP temp;
+	  temp = UnitTestUtil::GetEnviron("username");
       dictionary->SetProperty(L"Username", temp);
 	  const wchar_t *password = dictionary->GetProperty(L"Password");
-	  mbstowcs(temp, UnitTestUtil::GetEnviron("password"), sizeof(temp));
+	  temp = UnitTestUtil::GetEnviron("password");
 	  dictionary->SetProperty(L"Password", temp);
-	  mbstowcs(temp, UnitTestUtil::GetEnviron("service"), sizeof(temp));
+	  temp = UnitTestUtil::GetEnviron("service");
 	  dictionary->SetProperty(L"Service", temp);
 
 #endif

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConnectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConnectTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConnectTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -83,7 +83,7 @@
 {
     try
     {
-        mConnection = UnitTestUtil::GetConnection("", true);
+        mConnection = UnitTestUtil::GetConnection(L"", true);
     }
     catch (FdoException *ex)
     {

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConstraintsTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConstraintsTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConstraintsTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -19,7 +19,7 @@
 #include "UnitTestUtil.h"
 #include "Parse/Parse.h"
 
-#define			DB_NAME_CONSTRAINTS_SUFFIX "_constraints"
+#define			DB_NAME_CONSTRAINTS_SUFFIX L"_constraints"
 
 #define			RECREATE_CONSTRAINTS_DB		true
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDatastoreTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDatastoreTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDatastoreTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -116,7 +116,7 @@
 
     try
     {
- 		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+ 		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 		connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( connectString);
 
@@ -130,10 +130,7 @@
 
 		FdoPtr<FdoIDataStoreReader>	pReader = pListDataStoresCmd->Execute();
 
-		FdoStringP datastore = FdoStringP::Format(
-								L"%hs",
-								UnitTestUtil::GetEnviron("datastore", "_DBCMD")
-								);
+		FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", L"_DBCMD");
 
 		DBG(printf("\n.DATABASES\n"));
 		while ( pReader->ReadNext() )
@@ -180,7 +177,7 @@
 
     try
     {
-		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 		connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( connectString);
 
@@ -188,10 +185,7 @@
 
         CreateDatastore( 
             connection,
-   			FdoStringP::Format(
-    			L"%hs",
-	    		UnitTestUtil::GetEnviron("datastore", "_DBCMD")
-            )
+    		UnitTestUtil::GetEnviron("datastore", L"_DBCMD")
 		);
     
         connection->Close ();
@@ -259,7 +253,7 @@
 
     try
     {
-		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 		connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( connectString);
 
@@ -281,10 +275,7 @@
 
 			if ( wcscmp( name, L"DataStore" ) == 0 )
 			{
-				FdoStringP datastore = FdoStringP::Format(
-										L"%hs",
-										UnitTestUtil::GetEnviron("datastore", "_DBCMD")
-										);
+				FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", L"_DBCMD");
  				dictionary->SetProperty( name, datastore );
 			}
 			else if ( wcscmp( name, L"Description" ) == 0 )
@@ -327,7 +318,7 @@
 
     try
     {
-		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 		connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( connectString);
 
@@ -357,7 +348,7 @@
 
     try
     {
- 		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+ 		wchar_t *connectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 		connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( connectString);
 
@@ -369,10 +360,7 @@
 
 		FdoPtr<FdoIDataStoreReader>	pReader = pListDataStoresCmd->Execute();
 
-		FdoStringP datastore = FdoStringP::Format(
-								L"%hs",
-								UnitTestUtil::GetEnviron("datastore", "")
-								);
+		FdoStringP datastore = UnitTestUtil::GetEnviron("datastore");
 
 		DBG(printf("\n.DATABASES\n"));
 		while ( pReader->ReadNext() )

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -25,9 +25,9 @@
     mSuffix[0] = '\0';
 }
 
-FdoDeleteTest::FdoDeleteTest(char *suffix)
+FdoDeleteTest::FdoDeleteTest(wchar_t *suffix)
 {
-    strncpy(mSuffix, suffix, 11 );
+    wcsncpy(mSuffix, suffix, 11 );
     mSuffix[11] = '\0';
 }
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoDeleteTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -31,7 +31,7 @@
 
 public:
     FdoDeleteTest(void);
-    FdoDeleteTest(char*);
+    FdoDeleteTest(wchar_t*);
     virtual ~FdoDeleteTest(void);
     virtual void setUp ();
 
@@ -42,7 +42,7 @@
     virtual void  set_provider() {};   
 
 private:
-    char  mSuffix[12];
+    wchar_t  mSuffix[12];
 };
 
 #endif // CPP_UNIT_FDODELETETEST_H

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -21,8 +21,8 @@
 #include "UnitTestUtil.h"
 #include "XmlFormatter.h"
 
-#define   DB_NAME_SRC_SUFFIX        "_impexp_src"
-#define   DB_NAME_DEST_SUFFIX       "_impexp_dest"
+#define   DB_NAME_SRC_SUFFIX        L"_impexp_src"
+#define   DB_NAME_DEST_SUFFIX       L"_impexp_dest"
 
 FdoImportExportTest::FdoImportExportTest(void)
 {
@@ -403,7 +403,7 @@
     FdoIoStream* outStream1,            // export to this XML document (excludes default spatial context) 
     FdoIoStream* outStream2,            // export to this XML document (excludes default spatial context)
     FdoXmlSpatialContextFlags* flags,   // spatial context serialization flags
-    char* dbName,                       // Datastore to import into and export from
+    FdoString* dbName,                  // Datastore to import into and export from
     FdoBoolean createDB,                // true - re-create database before running test
     FdoBoolean importSC,                // true - import spatial contexts
     FdoBoolean importSchemas            // true - import feature schemas.

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoImportExportTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -53,7 +53,7 @@
         FdoIoStream* outStream1, 
         FdoIoStream* outStream2, 
         FdoXmlSpatialContextFlags* flags,
-        char* dbName,
+        FdoString* dbName,
         FdoBoolean createDB = true,
         FdoBoolean importSC = true,
         FdoBoolean importSchemas = true

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -36,10 +36,10 @@
     mSuffix[0] = '\0';
 }
 
-FdoInsertTest::FdoInsertTest(char *suffix)
+FdoInsertTest::FdoInsertTest(wchar_t *suffix)
 {
     m_DisableFailures = false;
-    strncpy(mSuffix, suffix, 11 );
+    wcsncpy(mSuffix, suffix, 11 );
     mSuffix[11] = '\0';
 }
 
@@ -1294,7 +1294,7 @@
             L"aaaaaaaaaabbbbiiiii", 
             L"3333"};
 
-        connection = UnitTestUtil::GetConnection("LT", true, Connection_WithDatastore, 1, true );
+        connection = UnitTestUtil::GetConnection(L"LT", true, Connection_WithDatastore, 1, true );
 
         // Setup the long transaction environment required for this test.
         // NOTE: The long transaction names are prefixed with the current user

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoInsertTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -40,7 +40,7 @@
 
 public:
     FdoInsertTest(void);
-    FdoInsertTest(char *suffix);
+    FdoInsertTest(wchar_t *suffix);
     virtual ~FdoInsertTest(void);
     void setUp ();
 
@@ -87,7 +87,7 @@
     virtual FdoFloat GetSmallestSingleValue();
     virtual FdoDouble GetSmallestDoubleValue();
 
-    char  mSuffix[12];
+    wchar_t  mSuffix[12];
     bool m_DisableFailures;
 };
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoMultiThreadTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoMultiThreadTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoMultiThreadTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -50,7 +50,7 @@
 
 FdoIConnection * FdoMultiThreadTest::GetConnection()
 {
-	return UnitTestUtil::GetConnection("", true);
+	return UnitTestUtil::GetConnection(L"", true);
 }
 
 void FdoMultiThreadTest::StartTest ( FunctionInfo *funInfo )

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaRollbackTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaRollbackTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaRollbackTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -19,7 +19,7 @@
 #include "UnitTestUtil.h"
 #include "ConnectionUtil.h"
 
-#define   DB_NAME_SUFFIX            "_Rollback_schema"
+#define   DB_NAME_SUFFIX            L"_Rollback_schema"
 
 FdoSchemaRollbackTest::FdoSchemaRollbackTest(void) :
     mCanAddNotNullCol(true)

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -21,7 +21,7 @@
 #include <Rdbms/Override/RdbmsOvPhysicalSchemaMapping.h>
 #include <Rdbms/Override/RdbmsOvPropertyMappingConcrete.h>
 
-#define DB_SUFFIX "_nometaschema"
+#define DB_SUFFIX L"_nometaschema"
 
 FdoSchemaTest::FdoSchemaTest(void) :
     m_bDatabaseCreated(false)
@@ -43,7 +43,7 @@
     try
     {
         FdoStringP dataStoreName = UnitTestUtil::GetEnviron("datastore", DB_SUFFIX);
-        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, L"");
         FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
         connection->SetConnectionString( userConnectString );
         connection->Open();

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -33,9 +33,9 @@
     mSuffix[0] = '\0';
 }
 
-FdoSelectTest::FdoSelectTest(char *suffix)
+FdoSelectTest::FdoSelectTest(wchar_t *suffix)
 {
-    strncpy(mSuffix, suffix, 11 );
+    wcsncpy(mSuffix, suffix, 11 );
     mSuffix[11] = '\0';
 }
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSelectTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -42,7 +42,7 @@
 
 public:
     FdoSelectTest(void);
-    FdoSelectTest(char* suffix);
+    FdoSelectTest(wchar_t* suffix);
     virtual ~FdoSelectTest(void);
     void setUp ();
     void tearDown ();
@@ -88,7 +88,7 @@
     void read_non_feature_data( FdoIFeatureReader *myReader, bool subset = false );
     void read_feature_data2( FdoIFeatureReader *myReader );
 
-    char mSuffix[12];
+    wchar_t mSuffix[12];
 };
 
 #endif // CPP_UNIT_FDOSELECTTEST_H

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSqlCmdTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSqlCmdTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoSqlCmdTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -63,7 +63,7 @@
 {
     try
     {
-        mConnection = (FdoIConnection *) UnitTestUtil::GetConnection("", true);
+        mConnection = (FdoIConnection *) UnitTestUtil::GetConnection(L"", true);
 
     }
     catch (FdoException *ex)
@@ -251,7 +251,7 @@
 
         try
         {
-            FdoPtr<FdoIConnection> mConn = UnitTestUtil::GetConnection("", false);
+            FdoPtr<FdoIConnection> mConn = UnitTestUtil::GetConnection(L"", false);
 
             ascCmd = (FdoRdbmsActivateSpatialContext *)mConn->CreateCommand( FdoCommandType_ActivateSpatialContext );
 
@@ -269,7 +269,7 @@
 
         try
         {
-            FdoPtr<FdoIConnection> mConn = UnitTestUtil::GetConnection("", false);
+            FdoPtr<FdoIConnection> mConn = UnitTestUtil::GetConnection(L"", false);
 
             ascCmd = (FdoRdbmsActivateSpatialContext *)mConn->CreateCommand( FdoCommandType_ActivateSpatialContext );
 
@@ -287,7 +287,7 @@
 
         try
         {
-            FdoPtr<FdoIConnection> mConn = UnitTestUtil::GetConnection("", false);
+            FdoPtr<FdoIConnection> mConn = UnitTestUtil::GetConnection(L"", false);
 
             dscCmd = (FdoRdbmsDestroySpatialContext *)mConn->CreateCommand( FdoCommandType_DestroySpatialContext );
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -34,11 +34,11 @@
     mSuffix[0] = '\0';
 }
 
-FdoUpdateTest::FdoUpdateTest(char *suffix)
+FdoUpdateTest::FdoUpdateTest(wchar_t *suffix)
 {
     m_DisableFailures = false;
 	m_hasGeom = m_hasAssoc = true;
-    strncpy(mSuffix, suffix, 11 );
+    wcsncpy(mSuffix, suffix, 11 );
     mSuffix[11] = '\0';
 }
 
@@ -564,7 +564,7 @@
 
     try
     {
-        connection = UnitTestUtil::GetConnection((char*)(this->MultiIdSuffix()), true);
+        connection = UnitTestUtil::GetConnection(this->MultiIdSuffix(), true);
         UnitTestUtil::CreateLandSchema(connection);
         UnitTestUtil::CreateNonUniqueSchema(connection);
 
@@ -1337,7 +1337,7 @@
 
 	try
 	{
-        connection = UnitTestUtil::GetConnection("LT", true, Connection_WithDatastore, 1, true);
+        connection = UnitTestUtil::GetConnection(L"LT", true, Connection_WithDatastore, 1, true);
 
         // Generate the necessary long transaction names.
 
@@ -1770,10 +1770,7 @@
     FdoStringP table_noid_nogeom = TableNoIdNoGeomName();
 
     try {
-        FdoStringP datastore = FdoStringP::Format(
-            L"%hs",
-            UnitTestUtil::GetEnviron("datastore", (char*)(NoMetaSuffix()))
-        );
+        FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", NoMetaSuffix());
 
         printf( "\nOpening Connection ...\n" );
 
@@ -1811,7 +1808,7 @@
         connection = UnitTestUtil::CreateConnection(
             false,
             false,
-            (char*)(NoMetaSuffix())
+            NoMetaSuffix()
         );
 
         CreateExternalData( connection, phMgr, table_id_geom, m_hasGeom, m_hasAssoc );
@@ -2325,17 +2322,17 @@
     }
 }
 
-const char* FdoUpdateTest::NoMetaSuffix()
+FdoString* FdoUpdateTest::NoMetaSuffix()
 {
-    static const char* noMetaSuffix = "_no_meta";
+    static FdoString* noMetaSuffix = L"_no_meta";
 
     return noMetaSuffix;
 }
 
 
-const char* FdoUpdateTest::MultiIdSuffix()
+FdoString* FdoUpdateTest::MultiIdSuffix()
 {
-    static const char* multiIdSuffix = "";
+    static FdoString* multiIdSuffix = L"";
 
     return multiIdSuffix;
 }

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -40,7 +40,7 @@
 
 public:
     FdoUpdateTest(void);
-    FdoUpdateTest(char*);
+    FdoUpdateTest(wchar_t*);
     virtual ~FdoUpdateTest(void);
     void setUp ();
 
@@ -75,8 +75,8 @@
     );
     void CheckGeometry(FdoPtr<FdoIFeatureReader> rdr, FdoString* propName, double expectedX, double expectedY, double expectedZ);
 
-    virtual const char* NoMetaSuffix();
-    virtual const char* MultiIdSuffix();
+    virtual FdoString* NoMetaSuffix();
+    virtual FdoString* MultiIdSuffix();
     virtual FdoStringP TableIdGeomName();
     virtual FdoStringP TableNoIdNoGeomName();
     virtual FdoStringP Key2ColName();
@@ -92,7 +92,7 @@
 
 protected:
     void ConditionalUpdateSetup (FdoIConnection *connection, FdoStringP insLtName);
-    char  mSuffix[12];
+    wchar_t  mSuffix[12];
 };
 
 #endif // CPP_UNIT_FDOUPDATETEST_H

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/GeometryTests.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/GeometryTests.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/GeometryTests.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "UnitTestUtil.h"
 #include "GeometryTests.h"
 
-#define DB_SUFFIX "_rdbitest"
+#define DB_SUFFIX L"_rdbitest"
 
 GeometryTests::GeometryTests (void)
 {
@@ -44,7 +44,7 @@
         {
 	        try
             {
-		        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
                 FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
                 connection->SetConnectionString( userConnectString );
                 connection->Open();

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -23,9 +23,9 @@
 #include <Sm/Ph/Rd/ConstraintReader.h>
 #include <Sm/Ph/SpatialIndex.h>
 
-const char* SchemaMgrTests::DB_NAME_SUFFIX =           "_schema_mgr";
-const char* SchemaMgrTests::DB_NAME_COPY_SUFFIX =      "_schema_mgr_copy";
-const char* SchemaMgrTests::DB_NAME_FOREIGN_SUFFIX =   "_schema_mgr_f";
+FdoString* SchemaMgrTests::DB_NAME_SUFFIX =           L"_schema_mgr";
+FdoString* SchemaMgrTests::DB_NAME_COPY_SUFFIX =      L"_schema_mgr_copy";
+FdoString* SchemaMgrTests::DB_NAME_FOREIGN_SUFFIX =   L"_schema_mgr_f";
 
 SchemaMgrTests::SchemaMgrTests (void)
 {
@@ -77,10 +77,7 @@
         printf( "Predeleting schema ...\n" );
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
         );
 
         FdoSmPhOwnerP owner = phMgr->FindOwner( datastore, L"", false );
@@ -243,7 +240,7 @@
         UnitTestUtil::ExportDb( fdoConn, stream1 );
 		UnitTestUtil::Stream2File( stream1, UnitTestUtil::GetOutputFileName( L"smtables_logical.xml" ) );
 
-        UnitTestUtil::CloseConnection( fdoConn, false, (char*) DB_NAME_SUFFIX );
+        UnitTestUtil::CloseConnection( fdoConn, false, DB_NAME_SUFFIX );
 /* TODO: doesn't work on SqlServer
         owner->SetElementState( FdoSchemaElementState_Deleted );
         owner->Commit();
@@ -319,7 +316,7 @@
 
         UnitTestUtil::Stream2File( stream1, UnitTestUtil::GetOutputFileName( L"gen_default1.xml" ) );
 
-        UnitTestUtil::CloseConnection( fdoConn, false, (char*) DB_NAME_COPY_SUFFIX );
+        UnitTestUtil::CloseConnection( fdoConn, false, DB_NAME_COPY_SUFFIX );
 
         // The generated XML file differs depending whether or not it is generated on a
         // SQL Server 2000 or 2005 instance. The difference is with a table system property
@@ -401,10 +398,7 @@
         printf( "Predeleting schema ...\n" );
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
         );
 
         FdoSmPhOwnerP owner = phMgr->FindOwner( datastore, L"", false );
@@ -475,7 +469,7 @@
         classDef = classes->FindItem( phMgr->GetDcDbObjectName(L"ONE_GEOM") );
         VldGenGeom( classDef );
 
-        UnitTestUtil::CloseConnection( fdoConn, false, (char*) DB_NAME_COPY_SUFFIX );
+        UnitTestUtil::CloseConnection( fdoConn, false, DB_NAME_COPY_SUFFIX );
 
         phMgr = NULL;
         mgr = NULL;
@@ -532,24 +526,15 @@
         FdoSmPhDatabaseP database = phMgr->GetDatabase();
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
         );
 
         FdoStringP fDatastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_FOREIGN_SUFFIX)
         );
 
         FdoStringP datastorePrefix = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", "")
-            )
+            UnitTestUtil::GetEnviron("datastore")
         );
 
         FdoSmPhOwnerP owner = phMgr->FindOwner( datastore, L"", false );
@@ -613,7 +598,7 @@
 
         printf( "Getting Feature Schemas using config doc ...\n" );
 
-        FdoStringP dbConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, "_schema_mgr");
+        FdoStringP dbConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, L"_schema_mgr");
 
         fdoConn = UnitTestUtil::GetProviderConnectionObject();
         FdoIoFileStreamP stream1 = FdoIoFileStream::Create( L"config1_in.xml", L"rt" );
@@ -628,7 +613,7 @@
         FdoIoStreamP stream4 = OverrideBend( stream3, datastorePrefix, L"(user)" );
         UnitTestUtil::Stream2File( stream4, UnitTestUtil::GetOutputFileName( L"schemaGenConfig1.xml" ) );
 
-        UnitTestUtil::CloseConnection( fdoConn, false, "_schema_mgr" );
+        UnitTestUtil::CloseConnection( fdoConn, false, L"_schema_mgr" );
 
 #ifdef RDBI_DEF_ORA
 	    UnitTestUtil::CheckOutput( "schemaGenConfig1_master.txt", UnitTestUtil::GetOutputFileName( L"schemaGenConfig1.xml" ) );
@@ -684,10 +669,7 @@
         GdbiCommands* gdbiCommands = gdbiConn->GetCommands();
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
         );
 
         FdoSmPhOwnerP owner = phMgr->FindOwner( datastore, L"", false );
@@ -820,7 +802,7 @@
         idProps = featClass->GetIdentityProperties();
         CPPUNIT_ASSERT( idProps->GetCount() == 0 );        
 
-        UnitTestUtil::CloseConnection( fdoConn, false, "_schema_mgr" );
+        UnitTestUtil::CloseConnection( fdoConn, false, L"_schema_mgr" );
 
         printf( "Updating original schema ...\n" );
 
@@ -861,7 +843,7 @@
         fdoConn = UnitTestUtil::CreateConnection(
             false,
             false,
-            "_schema_mgr"
+            L"_schema_mgr"
         );
 
         pDescCmd = (FdoIDescribeSchema*) fdoConn->CreateCommand(FdoCommandType_DescribeSchema);
@@ -943,10 +925,7 @@
 		FdoSmPhGrdMgrP phMgr = mgr->GetPhysicalSchema()->SmartCast<FdoSmPhGrdMgr>();
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
         );
 
 		FdoSmPhDatabaseP database = phMgr->GetDatabase();
@@ -1066,10 +1045,7 @@
     FdoPtr<FdoIConnection> fdoConn;
     StaticConnection* conn = CreateStaticConnection();
  
-    FdoStringP datastoreName = FdoStringP::Format(
-        L"%hs",
-        UnitTestUtil::GetEnviron("datastore", "")
-    );
+    FdoStringP datastoreName = UnitTestUtil::GetEnviron("datastore");
 
     try
     {
@@ -1085,11 +1061,11 @@
         // Sets the other env.
         UnitTestUtil::SetProvider( conn->GetServiceName() ); 
 
-        fdoConn = UnitTestUtil::GetConnection("", true);
+        fdoConn = UnitTestUtil::GetConnection(L"", true);
         fdoConn->Close();
         fdoConn = NULL;
 
-        FdoStringP dbConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, "");
+        FdoStringP dbConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore);
 
         fdoConn = UnitTestUtil::GetProviderConnectionObject();
         FdoIoFileStreamP stream1 = FdoIoFileStream::Create( L"config1_in.xml", L"rt" );

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/SchemaMgrTests.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -91,9 +91,9 @@
     void CreateTableGroup( FdoSmPhOwnerP owner, FdoStringP prefix, FdoInt32 count, int lt_mode );
     void CreateFkey( FdoSmPhOwnerP owner, FdoStringP fTableName, FdoStringP pTableName, FdoStringP pOwnerName = L"" );
 
-    static const char* DB_NAME_SUFFIX;
-    static const char* DB_NAME_COPY_SUFFIX;
-    static const char* DB_NAME_FOREIGN_SUFFIX;
+    static FdoString* DB_NAME_SUFFIX;
+    static FdoString* DB_NAME_COPY_SUFFIX;
+    static FdoString* DB_NAME_FOREIGN_SUFFIX;
 
 private:
     FdoSmPhTableP CreateIxTable( FdoSmPhOwnerP owner, FdoStringP tableName, int lt_mode );

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/SelectTests.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/SelectTests.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/SelectTests.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "UnitTestUtil.h"
 #include "SelectTests.h"
 
-#define DB_SUFFIX "_rdbitest"
+#define DB_SUFFIX L"_rdbitest"
 
 SelectTests::SelectTests (void)
 {
@@ -44,7 +44,7 @@
         {
 	        try
             {
-		        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
                 FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
                 connection->SetConnectionString( userConnectString );
                 connection->Open();

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -876,19 +876,19 @@
     return (ret);
 }
 
-wchar_t *UnitTestUtil::GetConnectionString(StringConnTypeRequest pTypeReq, const char *suffix)
+wchar_t *UnitTestUtil::GetConnectionString(StringConnTypeRequest pTypeReq, FdoString *suffix)
 {
 	return UnitTestUtil::InfoUtilConnection->GetConnectionString(pTypeReq, suffix);
 }
 
-void UnitTestUtil::CreateDB(bool addSchema, bool useBaseMapping, char* suffix, int lt_method, bool lt_method_fixed)
+void UnitTestUtil::CreateDB(bool addSchema, bool useBaseMapping, FdoString *suffix, int lt_method, bool lt_method_fixed)
 {
-    char *service = UnitTestUtil::GetEnviron("service");
-    char *username = UnitTestUtil::GetEnviron("username");
-    char *password = UnitTestUtil::GetEnviron("password");
-    char *datastore = UnitTestUtil::GetEnviron("datastore", suffix);
-    char *schemaType = UnitTestUtil::GetEnviron("schematype");
-    const char *description = UnitTestUtil::GetEnv("description",(char*) NULL);
+    FdoStringP service = UnitTestUtil::GetEnviron("service");
+    FdoStringP username = UnitTestUtil::GetEnviron("username");
+    FdoStringP password = UnitTestUtil::GetEnviron("password");
+    FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", suffix);
+    FdoStringP schemaType = UnitTestUtil::GetEnviron("schematype");
+    FdoStringP description = FdoStringP::Format( L"%hs", UnitTestUtil::GetEnv("description",(char*) NULL) );
 
      // Long Transaction method defaults to the one passed in.
     // If it is not fixed, it can be overridden by ltmethod from
@@ -912,7 +912,7 @@
     {
         connection->Open ();
 
-		CreateDB( connection, datastore, (char *)description, password, schemaType, local_lt_method );
+		CreateDB( connection, datastore, description, password, (char*)(const char*)schemaType, local_lt_method );
         connection->Close();
         connectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, suffix);
         connection->SetConnectionString ( connectString);
@@ -939,7 +939,7 @@
     connection->Close ();
 }
 
-void UnitTestUtil::CreateDB( FdoIConnection* connection, char *datastore, char *description, char *password, char *schemaType, int local_lt_method )
+void UnitTestUtil::CreateDB( FdoIConnection* connection, FdoString *datastore, FdoString *description, FdoString *password, char *schemaType, int local_lt_method )
 {
     FdoPtr<FdoRdbmsCreateDataStore> createCmd = (FdoRdbmsCreateDataStore*)connection->CreateCommand( FdoCommandType_CreateDataStore );
 	
@@ -953,15 +953,15 @@
 		
 		if ( wcscmp( name, L"DataStore" ) == 0 )
 		{
-            dictionary->SetProperty( name, FdoStringP::Format(L"%hs",datastore) );
+            dictionary->SetProperty( name, datastore );
 		} 
 		else if ( wcscmp( name, L"Password" ) == 0 )
 		{
-			dictionary->SetProperty( name, FdoStringP::Format(L"%hs",password) );
+			dictionary->SetProperty( name, password );
 		}
 		else if ( wcscmp( name, L"Description" ) == 0 )
 		{
-			dictionary->SetProperty( name, FdoStringP::Format(L"%hs",description) );
+			dictionary->SetProperty( name, description );
 		}
 		else if ( (wcscmp( name, L"LtMode" ) == 0 )|| (wcscmp( name, L"LockMode" ) == 0))
 		{
@@ -1010,7 +1010,7 @@
 
 void UnitTestUtil::PrintException( FdoException* e, FILE* fp, FdoBoolean stripLineNo )
 {
-    FdoStringP userDSPref = UnitTestUtil::GetEnviron("datastore", "");
+    FdoStringP userDSPref = UnitTestUtil::GetEnviron("datastore", L"");
 
     FdoPtr<FdoException> currE = e;
     // Add ref to prevent smart pointer from destroying exception.
@@ -1119,10 +1119,10 @@
     fclose( fp );
 }
 
-char *UnitTestUtil::GetEnviron(const char *name, const char *suffix)
+FdoStringP UnitTestUtil::GetEnviron(const char *name, FdoString *suffix)
 {
-    char* pRet = (char*)UnitTestUtil::InfoUtilConnection->GetEnviron(name, suffix);
-    return (pRet != NULL) ? pRet : (char *) "";
+    FdoStringP pRet = UnitTestUtil::InfoUtilConnection->GetEnviron(name, suffix);
+    return pRet;
 }
 
 const char* UnitTestUtil::GetEnv( const char* pVar, const char* pDefault )
@@ -1139,11 +1139,11 @@
 	UnitTestUtil::InfoUtilConnection->SetProvider(providerName);
 }
 
-void UnitTestUtil::CloseConnection( FdoIConnection* connection, bool bDelete, char *suffix )
+void UnitTestUtil::CloseConnection( FdoIConnection* connection, bool bDelete, FdoString *suffix )
 {
-    char *pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
-    char *pPassword = UnitTestUtil::GetEnviron("password");
-    char *pService = UnitTestUtil::GetEnviron("service");
+    FdoStringP pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
+    FdoStringP pPassword = UnitTestUtil::GetEnviron("password");
+    FdoStringP pService = UnitTestUtil::GetEnviron("service");
 
     if ( bDelete ) {
          DropDb( connection, pDatastore, pPassword, pService );
@@ -1154,7 +1154,7 @@
 FdoIConnection* UnitTestUtil::CreateConnection(
     bool bPredelete,
     bool bCreate,
-    const char *suffix,
+    FdoString *suffix,
     const char *schemaType,
     bool* bCreated,
     int   lt_method,
@@ -1166,10 +1166,10 @@
     if ( bCreated )
         (*bCreated) = false;
 
-    const char *pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
-    const char *pPassword = UnitTestUtil::GetEnviron("password");
-    const char *pService = UnitTestUtil::GetEnviron("service");
-    const char *pSchemaType = schemaType;
+    FdoStringP pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
+    FdoStringP pPassword = UnitTestUtil::GetEnviron("password");
+    FdoStringP pService = UnitTestUtil::GetEnviron("service");
+    FdoStringP pSchemaType = schemaType;
 
     // Long Transaction method defaults to the one passed in.
     // If it is not fixed, it can be overridden by ltmethod from
@@ -1210,7 +1210,7 @@
 
     if ( bCreate && !bExists ) {
   
-        CreateDB( connectionMetadata, (char *)pDatastore, (char *)"", (char *)pPassword, (char *)pSchemaType, local_lt_method );
+        CreateDB( connectionMetadata, pDatastore, L"", pPassword, (char *)(const char*)pSchemaType, local_lt_method );
 
         if ( bCreated )
             (*bCreated) = true;
@@ -1226,17 +1226,17 @@
 
 void UnitTestUtil::DropDb()
 {
-    char *service = UnitTestUtil::GetEnviron("service");
-    char *username = UnitTestUtil::GetEnviron("username");
-    char *password = UnitTestUtil::GetEnviron("password");
-    char *datastore = UnitTestUtil::GetEnviron("datastore");
+    FdoStringP service = UnitTestUtil::GetEnviron("service");
+    FdoStringP username = UnitTestUtil::GetEnviron("username");
+    FdoStringP password = UnitTestUtil::GetEnviron("password");
+    FdoStringP datastore = UnitTestUtil::GetEnviron("datastore");
     bool bExists = DatastoreExists();
 
     if (bExists)
     {
         //FdoRdbmsConnection::DeleteDb(context, datastore, password, service);
 
-        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 
         FdoPtr<FdoIConnection> connection = GetProviderConnectionObject();
         connection->SetConnectionString( userConnectString );
@@ -1251,37 +1251,35 @@
 
 }
 
-void UnitTestUtil::DropDb( FdoIConnection *connection, const char* pDatastore, const char* pPassword, const char* pService )
+void UnitTestUtil::DropDb( FdoIConnection *connection, FdoString* pDatastore, FdoString* pPassword, FdoString* pService )
 {
     FdoPtr<FdoIDestroyDataStore> pDelCmd = (FdoIDestroyDataStore*)connection->CreateCommand( FdoCommandType_DestroyDataStore );
 
 	FdoPtr<FdoIDataStorePropertyDictionary> dictionary = pDelCmd->GetDataStoreProperties();
 		
-	dictionary->SetProperty( L"DataStore", FdoStringP::Format(L"%hs",pDatastore) );
+	dictionary->SetProperty( L"DataStore", pDatastore );
 
 	// NO provider requires the password 
-//	dictionary->SetProperty( L"Password", FdoStringP(pPassword) );
+//	dictionary->SetProperty( L"Password", pPassword );
 
 	// What happens with the service? is it really necessay?
 	pDelCmd->Execute();
 }
 
-bool UnitTestUtil::DatastoreExists(const char *suffix)
+bool UnitTestUtil::DatastoreExists(FdoString *suffix)
 {
     StaticConnection* staticConn;
 
     staticConn = UnitTestUtil::NewStaticConnection();
     staticConn->connect();
 
-    char *mbDatastore = GetEnviron("datastore", suffix);
-    wchar_t *wDatastore = NULL;
-    multibyte_to_wide(wDatastore, mbDatastore);
+    FdoStringP datastore = GetEnviron("datastore", suffix);
     bool found = false;
 
     FdoSchemaManagerP mgr = staticConn->CreateSchemaManager();
     FdoSmPhMgrP ph = mgr->GetPhysicalSchema();
 
-    if ( FdoSmPhOwnerP(ph->FindOwner(wDatastore, L"", false)) )
+    if ( FdoSmPhOwnerP(ph->FindOwner(datastore, L"", false)) )
         found = true;
 
     ph = NULL;
@@ -1292,7 +1290,7 @@
     return(found);
 }
 
-FdoIConnection* UnitTestUtil::GetConnection(char *suffix, bool bCreate, StringConnTypeRequest pTypeReq, int lt_method, bool lt_method_fixed)
+FdoIConnection* UnitTestUtil::GetConnection(FdoString *suffix, bool bCreate, StringConnTypeRequest pTypeReq, int lt_method, bool lt_method_fixed)
 {
     FdoIConnection* connection = GetProviderConnectionObject();
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -81,10 +81,10 @@
     static const char* GetEnv( const char* pVar, const char* pDefault );
 
 	static FdoIConnection* GetProviderConnectionObject();
-	static wchar_t *GetConnectionString(StringConnTypeRequest pTypeReq = Connection_WithDatastore, const char *suffix = "");
-    static void CreateDB(bool addSchema = true, bool useBaseMapping=false, char *suffix = "", int lt_method = 0, bool lt_method_fixed = false );
-	static void CreateDB( FdoIConnection* connection, char *username, char *description, char *password, char *schemaType, int local_lt_method );   
-	static char *GetEnviron(const char *name, const char *suffix = "");
+	static wchar_t *GetConnectionString(StringConnTypeRequest pTypeReq = Connection_WithDatastore, FdoString *suffix = L"");
+    static void CreateDB(bool addSchema = true, bool useBaseMapping=false, FdoString *suffix = L"", int lt_method = 0, bool lt_method_fixed = false );
+	static void CreateDB( FdoIConnection* connection, FdoString *username, FdoString *description, FdoString *password, char *schemaType, int local_lt_method );   
+	static FdoStringP GetEnviron(const char *name, FdoString *suffix = L"");
 	static void SetProvider( const char *providerName );
 
     // Set up and open a connection to a Database.
@@ -116,7 +116,7 @@
     static FdoIConnection*  CreateConnection(
         bool bPredelete,
         bool bCreate,
-        const char *suffix,
+        FdoString *suffix,
         const char *schemaType = NULL,
         bool* bCreated = NULL,
         int  lt_method = -1,
@@ -135,19 +135,19 @@
     static void CloseConnection(
         FdoIConnection* connection,
         bool bDelete,
-        char *suffix
+        FdoString *suffix
     );
 	static void DropDb();
-	static void DropDb( FdoIConnection *connection, const char* pDatastore, const char* pPassword, const char* pService );
+	static void DropDb( FdoIConnection *connection, FdoString* pDatastore, FdoString* pPassword, FdoString* pService );
     
 	// Check if the given connect contains the given datastore.
     //
     // Returns:
     //      true - datastore exists.
     //      false - otherwise.
-    static bool DatastoreExists(const char *suffix = "");
+    static bool DatastoreExists(FdoString *suffix = L"");
     
-	static FdoIConnection* GetConnection(char *suffix = "", bool bCreate = false, StringConnTypeRequest pTypeReq = Connection_WithDatastore, int lt_method = 0, bool lt_method_fixed = false );
+	static FdoIConnection* GetConnection(FdoString *suffix = L"", bool bCreate = false, StringConnTypeRequest pTypeReq = Connection_WithDatastore, int lt_method = 0, bool lt_method_fixed = false );
     static StaticConnection* NewStaticConnection();
 
 	// compares two doubles for *approximate* equality:

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoApplySchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoApplySchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoApplySchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -97,7 +97,7 @@
 
     if (0==wcscmp(name, L"oneforeign"))
     {
-        table->SetDatabase( FdoStringP(UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX)) );
+        table->SetDatabase( UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX) );
     }
 
     return table;

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoForeignSchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoForeignSchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoForeignSchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -41,11 +41,11 @@
 
 	if (dbExists)
 	{
-		sqlStmt = FdoStringP::Format(L"drop database %ls", (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore",DB_NAME_SUFFIX)));
+		sqlStmt = FdoStringP::Format(L"drop database %ls", (FdoString*) UnitTestUtil::GetEnviron("datastore",DB_NAME_SUFFIX));
 		UnitTestUtil::Sql2Db(sqlStmt, connection);
 	}
 	sqlStmt = FdoStringP::Format(
-		L"create database %ls character set latin1 collate latin1_bin", (FdoString*) FdoStringP(UnitTestUtil::GetEnviron("datastore",DB_NAME_SUFFIX)));
+		L"create database %ls character set latin1 collate latin1_bin", (FdoString*) UnitTestUtil::GetEnviron("datastore",DB_NAME_SUFFIX));
    
 	UnitTestUtil::Sql2Db(sqlStmt, connection);
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -22,7 +22,8 @@
 #include "ConnectionUtil.h"
 #include "MySqlConnectionUtil.h"
 
-#define UNSIGNED_SUFFIX "_unsigned"
+#define UNSIGNED_SUFFIX L"_unsigned"
+#define CHARSET_SUFFIX L"_charset"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( MySqlFdoInsertTest );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( MySqlFdoInsertTest, "FdoInsertTest");
@@ -198,10 +199,7 @@
         FdoSmPhMgrP phMgr = mgr->GetPhysicalSchema();
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", UNSIGNED_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", UNSIGNED_SUFFIX)
         );
 
         FdoSmPhDatabaseP database = phMgr->GetDatabase();
@@ -304,3 +302,156 @@
     }
 }
 
+void MySqlFdoInsertTest::characterSets()
+{
+    StaticConnection* conn = new MySqlStaticConnection();
+
+    try {
+
+        UnitTestUtil::SetProvider( conn->GetServiceName() ); 
+
+        conn->connect();
+
+        FdoSchemaManagerP mgr = conn->CreateSchemaManager();
+
+        FdoSmPhMgrP phMgr = mgr->GetPhysicalSchema();
+
+        FdoStringP datastore = phMgr->GetDcOwnerName(
+            UnitTestUtil::GetEnviron("datastore", CHARSET_SUFFIX)
+        );
+
+        FdoSmPhDatabaseP database = phMgr->GetDatabase();
+
+        FdoSmPhOwnerP owner = phMgr->FindOwner( datastore, L"", false );
+        if ( owner ) {
+            owner->SetElementState( FdoSchemaElementState_Deleted );
+            owner->Commit();
+        }
+
+        owner = database->CreateOwner(
+            datastore, 
+            false
+        );
+        owner->SetPassword( L"test" );
+        owner->Commit();
+        owner->SetCurrent();
+
+        GdbiConnection* gdbiConnection = phMgr->SmartCast<FdoSmPhGrdMgr>()->GetGdbiConnection();
+
+        // Create tables for various combinations of character set and types of characters
+        // that will be stored in the table. 
+        charSetCreateTable( gdbiConnection, L"latin1", L"ascii7" );
+        charSetCreateTable( gdbiConnection, L"latin1", L"8bit" );
+        charSetCreateTable( gdbiConnection, L"utf8", L"ascii7" );
+        charSetCreateTable( gdbiConnection, L"utf8", L"8bit" );
+        charSetCreateTable( gdbiConnection, L"utf8", L"japan" );
+        charSetCreateTable( gdbiConnection, L"ucs2", L"ascii7" );
+        charSetCreateTable( gdbiConnection, L"ucs2", L"8bit" );
+        charSetCreateTable( gdbiConnection, L"ucs2", L"japan" );
+        charSetCreateTable( gdbiConnection, L"cp932", L"ascii7" );
+        charSetCreateTable( gdbiConnection, L"cp932", L"japan" );
+
+        // A couple of combinations are not tried:
+        //  - latin11 character set, Japanese characters
+        //  = cp932 character set, 8 bit characters
+        // since these are expected to fail (characters not in character set).
+
+        FdoPtr<FdoIConnection> connection = UnitTestUtil::GetConnection(CHARSET_SUFFIX, false);
+
+        // Round-trip insert/select test each table.
+        charSetTestTable( connection, L"latin1", L"ascii7", L"abc", L"a" );
+        charSetTestTable( connection, L"latin1", L"8bit", L"\x00e4\x00e5", L"\x00e4" );
+        charSetTestTable( connection, L"utf8", L"ascii7", L"abc", L"a" );
+        charSetTestTable( connection, L"utf8", L"8bit", L"\x00e4\x00e5", L"\x00e4" );
+        charSetTestTable( connection, L"utf8", L"japan", L"\x30b0\x30b1", L"\x30b0" );
+        charSetTestTable( connection, L"ucs2", L"ascii7", L"abc", L"a" );
+        charSetTestTable( connection, L"ucs2", L"8bit", L"\x00e4\x00e5", L"\x00e4" );
+        charSetTestTable( connection, L"ucs2", L"japan", L"\x30b0\x30b1", L"\x30b0" );
+        charSetTestTable( connection, L"cp932", L"ascii7", L"abc", L"a" );
+        charSetTestTable( connection, L"cp932", L"japan", L"\x30b0\x30b1", L"\x30b0" );
+    }
+    catch (FdoCommandException *ex)
+    {
+        UnitTestUtil::FailOnException(ex);
+    }
+    catch (FdoException *ex)
+    {
+        UnitTestUtil::FailOnException(ex);
+    }
+}
+
+void MySqlFdoInsertTest::charSetCreateTable( GdbiConnection* gdbiConnection, FdoString* charSet, FdoString* dataCharSet )
+{
+    FdoStringP sqlStmt = FdoStringP::Format( 
+        L"create table %ls_%ls ( data varchar(10) not null, chardata char(1), primary key (data)) character set %ls collate %ls_bin",
+        charSet,
+        dataCharSet,
+        charSet,
+        charSet
+    );
+
+    gdbiConnection->ExecuteNonQuery( (FdoString*) sqlStmt, true );
+}
+
+void MySqlFdoInsertTest::charSetTestTable( FdoIConnection* connection, FdoString* charSet, FdoString* dataCharSet, FdoString* stringVal, FdoString* charVal )
+{
+    FdoStringP className = FdoStringP::Format( L"%ls_%ls", charSet, dataCharSet );
+
+    FdoPtr<FdoIInsert> insertCommand = (FdoIInsert *) connection->CreateCommand(FdoCommandType_Insert);
+    FdoPtr<FdoPropertyValueCollection> propertyValues;
+    FdoPtr<FdoDataValue> dataValue;
+    FdoPtr<FdoPropertyValue> propertyValue;
+
+    insertCommand->SetFeatureClassName(className);
+
+    propertyValues = insertCommand->GetPropertyValues();
+    propertyValue =  FdoPropertyValue::Create();
+    propertyValue->SetName( L"data" );
+    propertyValues->Add( propertyValue );
+
+    dataValue = FdoDataValue::Create(stringVal);
+    propertyValue->SetValue(dataValue);
+
+    propertyValue =  FdoPropertyValue::Create();
+    propertyValue->SetName( L"chardata" );
+    propertyValues->Add( propertyValue );
+
+    dataValue = FdoDataValue::Create(charVal);
+    propertyValue->SetValue(dataValue);
+
+    insertCommand->Execute();
+
+  	FdoPtr<FdoISelect>selCmd = (FdoISelect*)connection->CreateCommand( FdoCommandType_Select );
+    selCmd->SetFeatureClassName(className);
+
+    FdoPtr<FdoIFeatureReader>myReader = selCmd->Execute();
+    CPPUNIT_ASSERT( myReader->ReadNext() );
+    charSetVldValue( className, stringVal, myReader->GetString(L"data") );
+    charSetVldValue( className, charVal, myReader->GetString(L"chardata") );
+
+    CPPUNIT_ASSERT( !(myReader->ReadNext()) );
+
+}
+
+void MySqlFdoInsertTest::charSetVldValue( FdoString* className, FdoString* expectedVal, FdoString* val )
+{
+    if ( wcscmp(expectedVal, val) != 0 )
+    {
+        FdoStringP msg = FdoStringP::Format( 
+            L"Select failed: %ls: Unexpected value '%ls'", 
+            (FdoString*) className,
+            val 
+        );
+
+        printf( "%ls\n", (FdoString*) msg );
+ 
+        printf( "   selValue %d: ", wcslen(val) );
+        for ( int j = 0; j < wcslen(val); j++ ) 
+            printf( "%x ", val[j] );
+
+        printf( "\n" );
+
+        CPPUNIT_FAIL( (const char*) msg );
+    }
+}
+ 
\ No newline at end of file

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoInsertTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,18 +20,27 @@
 #define MYSQL_INSERTTESTS_H
 
 #include "FdoInsertTest.h"
+#include "../SchemaMgr/Ph/Mgr.h"
 
 class MySqlFdoInsertTest : public FdoInsertTest
 {
     CPPUNIT_TEST_SUB_SUITE (MySqlFdoInsertTest, FdoInsertTest);
     CPPUNIT_TEST( insertBoundaryUnsigned );
+    CPPUNIT_TEST( characterSets );
     CPPUNIT_TEST_SUITE_END ();
 
     void  set_provider();
     void insertDate ();
+    void charSetCreateTable( GdbiConnection* gdbiConnection, FdoString* charSet, FdoString* dataCharSet );
+    void charSetTestTable( FdoIConnection* connection, FdoString* charSet, FdoString* dataCharSet, FdoString* stringVal, FdoString* charVal );
+    void charSetVldValue( FdoString* className, FdoString* expectedVal, FdoString* val );
+
 public:
 	virtual void conditionalInsert() { }
     virtual void insertBoundaryUnsigned();
+
+    // Verifies that data can be round tripped to tables with various character sets.
+    virtual void characterSets();
 };
 
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -36,12 +36,12 @@
     try
     {
         printf( "Initializing Connection ... \n" );
-	    FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+	    FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, L"");
 	    connection = UnitTestUtil::GetProviderConnectionObject();
 	    connection->SetConnectionString ( userConnectString);
 	    connection->Open();
 
-        FdoStringP datastore = FdoStringP::Format(L"%hs", UnitTestUtil::GetEnviron("datastore", "_foreign_sch"));
+        FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", L"_foreign_sch");
         FdoStringP pQueryStringCr = L"CREATE DATABASE ";
 	    pQueryStringCr += datastore;
 	    pQueryStringCr += L";";
@@ -49,7 +49,7 @@
         {
             UnitTestUtil::Sql2Db( (const wchar_t*) pQueryStringCr, connection.p );
             connection->Close();
-            userConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, "_foreign_sch");
+            userConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, L"_foreign_sch");
 	        connection->SetConnectionString ( userConnectString);
 	        connection->Open();
             UnitTestUtil::Sql2Db( (const wchar_t**) mForeignPolygonTest, connection.p );
@@ -57,7 +57,7 @@
         }
         catch(...){}
         
-        userConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, "_foreign_sch");
+        userConnectString = UnitTestUtil::GetConnectionString(Connection_WithDatastore, L"_foreign_sch");
         connection->SetConnectionString ( userConnectString);
 	    connection->Open();
 
@@ -216,13 +216,9 @@
     NULL
 };
 
-const char* MySqlFdoUpdateTest::NoMetaSuffix()
+FdoString* MySqlFdoUpdateTest::NoMetaSuffix()
 {
-#ifdef _WIN32
-    static const char* noMetaSuffix = "_no_meta\xe4\xe5";
-#else
-    static const char* noMetaSuffix = "_no_meta";
-#endif
+    FdoString* noMetaSuffix = L"_no_meta\x30b0\x30b1";
 
     return noMetaSuffix;
 }

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlFdoUpdateTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -35,7 +35,7 @@
     void testForeignDataStore();
 
 protected:
-    virtual const char* NoMetaSuffix();
+    virtual FdoString* NoMetaSuffix();
 	static const wchar_t* mForeignPolygonTest[];
 };
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlSchemaMgrTests.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlSchemaMgrTests.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/MySql/MySqlSchemaMgrTests.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -28,7 +28,7 @@
 CPPUNIT_TEST_SUITE_REGISTRATION( MySqlSchemaMgrTests );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( MySqlSchemaMgrTests, "SchemaMgrTests");
 
-#define   DB_NAME_SUFFIX            "_schema_mgr"
+#define   DB_NAME_SUFFIX            L"_schema_mgr"
 
 StaticConnection* MySqlSchemaMgrTests::CreateStaticConnection()
 {
@@ -86,10 +86,7 @@
         printf( "Predeleting schema ...\n" );
 
         FdoStringP datastore = phMgr->GetDcOwnerName(
-            FdoStringP::Format(
-                L"%hs",
-                UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
-            )
+            UnitTestUtil::GetEnviron("datastore", DB_NAME_SUFFIX)
         );
 
         FdoSmPhOwnerP owner = phMgr->FindOwner( datastore, L"", false );

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -22,9 +22,9 @@
 
 bool OdbcBaseSetup::OracleDataSupportCreated = false;
 
-void OdbcBaseSetup::DestroyDataStore(FdoIConnection* pConnection, const char *suffix)
+void OdbcBaseSetup::DestroyDataStore(FdoIConnection* pConnection, FdoString *suffix)
 {
-	const char *pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
+	FdoStringP pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
 
 	FdoStringP pQueryStringDrp;
 	if (DataBaseType_Oracle == m_typeDB)
@@ -51,11 +51,11 @@
 	}
 }
 
-void OdbcBaseSetup::CreateDataStore(FdoIConnection* pConnection, const char *suffix)
+void OdbcBaseSetup::CreateDataStore(FdoIConnection* pConnection, FdoString *suffix)
 {
 	if (DataBaseType_Oracle == m_typeDB && OdbcBaseSetup::OracleDataSupportCreated == true)
 		return;
-	const char *pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
+	FdoStringP pDatastore = UnitTestUtil::GetEnviron("datastore", suffix);
 	// clean the before start
 	DestroyDataStore(pConnection, suffix);
 
@@ -97,7 +97,7 @@
 		UnitTestUtil::Sql2Db( (const wchar_t*) pQueryStringDrp, pConnection );
 
 		pConnection->Close();
-		pConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_NoDatastore, "") );
+		pConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_NoDatastore) );
 		pConnection->Open();
 		UnitTestUtil::Sql2Db( (const wchar_t**) mOracleAcadTestData, pConnection );
 		UnitTestUtil::Sql2Db( (const wchar_t**) mOracleNonAcadTest, pConnection );

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -73,8 +73,8 @@
     FdoString * GetPropertyNameAcdb3dpolylineRevision()  { return LikesUC() ? L"REVISIONNUMBER" : L"revisionnumber"; }
 	FdoString * GetPropertyNameAcdb3dpolylineDateTime()  { return LikesUC() ? L"DATETIME" : L"datetime1"; }
 
-	virtual void CreateDataStore(FdoIConnection* pConnection, const char *suffix);
-	virtual void DestroyDataStore(FdoIConnection* pConnection, const char *suffix);
+	virtual void CreateDataStore(FdoIConnection* pConnection, FdoString *suffix);
+	virtual void DestroyDataStore(FdoIConnection* pConnection, FdoString *suffix);
 	virtual void CreateAcadSchema(FdoIConnection* pConnection);
 	virtual void CreateNonAcadSchema(FdoIConnection* pConnection);
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -412,13 +412,13 @@
     }
 }
 
-wchar_t *OdbcConnectionUtil::GetConnectionString(StringConnTypeRequest pTypeReq, const char *suffix)
+wchar_t *OdbcConnectionUtil::GetConnectionString(StringConnTypeRequest pTypeReq, FdoString *suffix)
 {
-    char *service = UnitTestUtil::GetEnviron("service");
-    char *username = UnitTestUtil::GetEnviron("username");
-    char *password = UnitTestUtil::GetEnviron("password");
-    char *datastore = UnitTestUtil::GetEnviron("datastore", suffix);
-    char *dsnname = UnitTestUtil::GetEnviron("dsnname");
+    FdoStringP service = UnitTestUtil::GetEnviron("service");
+    FdoStringP username = UnitTestUtil::GetEnviron("username");
+    FdoStringP password = UnitTestUtil::GetEnviron("password");
+    FdoStringP datastore = UnitTestUtil::GetEnviron("datastore", suffix);
+    FdoStringP dsnname = UnitTestUtil::GetEnviron("dsnname");
 	
 	FdoStringP OracleDriverName = theOracleDriverName;
 
@@ -429,83 +429,236 @@
 	{
 		case Connection_WithDatastore:
 			if (m_ProviderActive == L"OdbcMySql")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={MySQL ODBC 3.51 Driver};SERVER=%hs;DATABASE=%hs;USER=%hs;PASSWORD=%hs;OPTION=3;\"", service, datastore, username, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"ConnectionString=\"DRIVER={MySQL ODBC 3.51 Driver};SERVER=%ls;DATABASE=%ls;USER=%ls;PASSWORD=%ls;OPTION=3;\"", 
+                    (FdoString*) service, 
+                    (FdoString*) datastore, 
+                    (FdoString*) username, 
+                    (FdoString*) password
+                );
 			else if (m_ProviderActive == L"OdbcSqlServer")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={SQL Server};SERVER=%hs;DATABASE=%hs;UID=%hs;PWD=%hs;\"", service, datastore, username, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"ConnectionString=\"DRIVER={SQL Server};SERVER=%ls;DATABASE=%ls;UID=%ls;PWD=%ls;\"", 
+                    (FdoString*) service, 
+                    (FdoString*) datastore, 
+                    (FdoString*) username, 
+                    (FdoString*) password
+                );
 			else if (m_ProviderActive == L"OdbcOracle")
 			{
 #ifdef _WIN32
 				FdoStringP pDatastore = datastore;
 				pDatastore = pDatastore.Upper();
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={%hs};UID=%hs;PWD=%hs;DBQ=%hs;XSM=%hs;\"", (const char*)OracleDriverName, (const char*)pDatastore, password, service, (const char*)pDatastore);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"ConnectionString=\"DRIVER={%ls};UID=%ls;PWD=%ls;DBQ=%ls;XSM=%ls;\"", 
+                    (FdoString*)OracleDriverName, 
+                    (FdoString*)pDatastore, 
+                    (FdoString*)password, 
+                    (FdoString*)service, 
+                    (FdoString*)pDatastore);
 #else
 				// We do not support extracting a schema from a DSN on Linux, so connect straight to the needed one.
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, datastore, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                    (FdoString*)dsnname, 
+                    (FdoString*)datastore, 
+                    (FdoString*)password
+                );
 #endif
 			}
 			else if (m_ProviderActive == L"OdbcAccess")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 			else if (m_ProviderActive == L"OdbcExcel")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*) dsnname
+                );
 			else if (m_ProviderActive == L"OdbcText")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*) dsnname
+                );
 		break;
 
 		case Connection_NoDatastore:
 			if (m_ProviderActive == L"OdbcMySql")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={MySQL ODBC 3.51 Driver};SERVER=%hs;USER=%hs;PASSWORD=%hs;OPTION=3;\"", service, username, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"ConnectionString=\"DRIVER={MySQL ODBC 3.51 Driver};SERVER=%ls;USER=%ls;PASSWORD=%ls;OPTION=3;\"", 
+                    (FdoString*)service, 
+                    (FdoString*)username, 
+                    (FdoString*)password
+                );
 			else if (m_ProviderActive == L"OdbcSqlServer")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={SQL Server};SERVER=%hs;UID=%hs;PWD=%hs;\"", service, username, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"ConnectionString=\"DRIVER={SQL Server};SERVER=%ls;UID=%ls;PWD=%ls;\"", 
+                    (FdoString*)service, 
+                    (FdoString*)username, 
+                    (FdoString*)password
+                );
 			else if (m_ProviderActive == L"OdbcOracle")
 			{
 #ifdef _WIN32
 				FdoStringP pDatastore = datastore;
 				pDatastore = pDatastore.Upper();
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={%hs};UID=%hs;PWD=%hs;DBQ=%hs;XSM=Default;\"", (const char*)OracleDriverName, (const char*)pDatastore /*username*/, password, service);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"ConnectionString=\"DRIVER={%ls};UID=%ls;PWD=%ls;DBQ=%ls;XSM=Default;\"", 
+                    (FdoString*)OracleDriverName, 
+                    (FdoString*)pDatastore /*username*/, 
+                    (FdoString*)password, 
+                    (FdoString*)service
+                );
 #else
 				// We do not support extracting a schema from a DSN on Linux, so connect straight to the needed one.
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, datastore, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                    (FdoString*)dsnname, 
+                    (FdoString*)datastore, 
+                    (FdoString*)password
+                );
 #endif
 			}
 			else if (m_ProviderActive == L"OdbcAccess")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 			else if (m_ProviderActive == L"OdbcExcel")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 			else if (m_ProviderActive == L"OdbcText")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 		break;
 		
 		case Connection_WithDSN:
 			if (m_ProviderActive == L"OdbcMySql")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, username, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                    (FdoString*)dsnname, 
+                    (FdoString*)username, 
+                    (FdoString*)password
+                );
 			else if (m_ProviderActive == L"OdbcSqlServer")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, username, password);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                    (FdoString*)dsnname, 
+                    (FdoString*)username, 
+                    (FdoString*)password
+                );
 			else if (m_ProviderActive == L"OdbcOracle")
 			{
 #ifdef _WIN32
 			FdoStringP pDatastore = datastore;
 			pDatastore = pDatastore.Upper();
-            swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, (const char*)pDatastore, password);
+            swprintf( 
+                connectString, 
+                sizeof(connectString)/sizeof(wchar_t), 
+                L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                (FdoString*)dsnname, 
+                (FdoString*)pDatastore, 
+                (FdoString*)password
+            );
 #else
 			// We do not support extracting a schema from a DSN on Linux, so connect straight to the needed one.
-			swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, datastore, password);
+			swprintf( 
+                connectString, 
+                sizeof(connectString)/sizeof(wchar_t), 
+                L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                (FdoString*)dsnname, 
+                (FdoString*)datastore, 
+                (FdoString*)password
+            );
 #endif
 			}
 			else if (m_ProviderActive == L"OdbcAccess")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 			else if (m_ProviderActive == L"OdbcDbase")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 			else if (m_ProviderActive == L"OdbcExcel")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 			else if (m_ProviderActive == L"OdbcText")
-				swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=;Password=;", dsnname);
+				swprintf( 
+                    connectString, 
+                    sizeof(connectString)/sizeof(wchar_t), 
+                    L"DataSourceName=%ls;UserId=;Password=;", 
+                    (FdoString*)dsnname
+                );
 		break;
 		case Connection_OraSetup:
 #ifdef _WIN32
-			swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"ConnectionString=\"DRIVER={%hs};UID=%hs;PWD=%hs;DBQ=%hs;XSM=Default;\"", (const char*)OracleDriverName, username, password, service);
+			swprintf( 
+                connectString, 
+                sizeof(connectString)/sizeof(wchar_t), 
+                L"ConnectionString=\"DRIVER={%ls};UID=%ls;PWD=%ls;DBQ=%ls;XSM=Default;\"", 
+                (FdoString*)OracleDriverName, 
+                (FdoString*)username, 
+                (FdoString*)password, 
+                (FdoString*)service
+            );
 #else
 			// We do not support extracting a schema from a DSN on Linux, so connect straight to the needed one.
-			swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, username, password);
+			swprintf( 
+                connectString, 
+                sizeof(connectString)/sizeof(wchar_t), 
+                L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+                (FdoString*)dsnname, 
+                (FdoString*)username, 
+                (FdoString*)password
+            );
 #endif
 		break;
 	}
@@ -654,8 +807,8 @@
 void OdbcConnectionUtil::SetupSqlServerDSN()
 {
     char teststr[1024];
-    sprintf (teststr, "DSN=%s%cDescription=Test SqlServer DSN for FDO ODBC provider%cSERVER=%s%cDATABASE=%s%c%c", (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"DSNSqlServer" ), 
-		'\0', '\0', (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"serviceSqlServer" ), '\0', UnitTestUtil::GetEnviron("datastore", ""), '\0', '\0', '\0');
+    sprintf (teststr, "DSN=%s%cDescription=Test SqlServer DSN for FDO ODBC provider%cSERVER=%s%cDATABASE=%ls%c%c", (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"DSNSqlServer" ), 
+		'\0', '\0', (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"serviceSqlServer" ), '\0', (FdoString*)(UnitTestUtil::GetEnviron("datastore", L"")), '\0', '\0', '\0');
     m_SetupSqlServerDSNdone = true;
     if (!SQLConfigDataSource (NULL, ODBC_ADD_DSN, "SQL Server", teststr))
     {
@@ -670,8 +823,8 @@
 void OdbcConnectionUtil::SetupMySqlDSN()
 {
     char teststr[1024];
-    sprintf (teststr, "DSN=%s%cDescription=Test MySql DSN for FDO ODBC provider%cSERVER=%s%cDATABASE=%s%cOPTION=3%c%c", (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"DSNMySql" ), 
-		'\0','\0', (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"serviceMySql" ), '\0', UnitTestUtil::GetEnviron("datastore", ""), '\0', '\0', '\0');
+    sprintf (teststr, "DSN=%s%cDescription=Test MySql DSN for FDO ODBC provider%cSERVER=%s%cDATABASE=%ls%cOPTION=3%c%c", (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"DSNMySql" ), 
+		'\0','\0', (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"serviceMySql" ), '\0', (FdoString*)(UnitTestUtil::GetEnviron("datastore", L"")), '\0', '\0', '\0');
     m_SetupMySqlDSNdone = true;
     if (!SQLConfigDataSource (NULL, ODBC_ADD_DSN, "MySQL ODBC 3.51 Driver", teststr))
     {
@@ -747,7 +900,7 @@
     if (SQLRETURN_OK(rc) && '\0' != theOracleDriverName[0])
     {
         char* datastoreUpper = driverDesc;
-        strcpy(datastoreUpper, UnitTestUtil::GetEnviron("datastore", ""));
+        sprintf(datastoreUpper, "%ls", (FdoString*) UnitTestUtil::GetEnviron("datastore", L""));
         (void) _strupr_s(datastoreUpper, 1024);
 
         sprintf ( teststr, "DSN=%s%cDescription=Oracle DSN for FDO ODBC provider%cServerName=%s%cUserID=%s%c%c", (const char*)(FdoStringP)m_SetupValues->GetPropertyValue( L"DSNOracle"), '\0',

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcConnectionUtil.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -53,7 +53,7 @@
 	virtual StaticConnection* NewStaticConnection ();
 	virtual FdoInsertTest* GetInsertTest ();
 	virtual FdoStringP GetOutputFileName (FdoString* pBaseFileName);
-	virtual wchar_t* GetConnectionString(StringConnTypeRequest pTypeReq = Connection_WithDatastore, const char *suffix = "");
+	virtual wchar_t* GetConnectionString(StringConnTypeRequest pTypeReq = Connection_WithDatastore, FdoString *suffix = L"");
 	virtual const char* GetSuffixTest(){return "_odbc";};
 
 protected:

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcDescribeSchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcDescribeSchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcDescribeSchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -20,7 +20,7 @@
 #include "OdbcDescribeSchemaTest.h"
 #include "UnitTestUtil.h"
 
-#define SUFFIX_TEST "_describeschema"
+#define SUFFIX_TEST L"_describeschema"
 
 CPPUNIT_TEST_SUITE_REGISTRATION (OdbcMySqlDescribeSchemaTest);
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( OdbcMySqlDescribeSchemaTest, "DescribeSchemaTest");
@@ -56,7 +56,7 @@
     try
     {
         printf( "Initializing Connection ... \n" );
-		FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+		FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 		// Create/open primary connection:
 		connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( userConnectString);
@@ -132,7 +132,7 @@
     try
     {
         connection = UnitTestUtil::GetProviderConnectionObject();
-		connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+		connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
         connection->Open();
 
         // The data source has dot '.' and hyphen '-' characters that shows up in the

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoConnectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoConnectTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoConnectTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -51,18 +51,18 @@
 		OdbcBaseSetup pOdbcSetup;
 		try
 		{
-			FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+			FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 			// Create/open primary connection:
 			connection = UnitTestUtil::GetProviderConnectionObject();
 			connection->SetConnectionString ( userConnectString);
 			connection->Open();
-			pOdbcSetup.CreateDataStore(connection.p, "");
+			pOdbcSetup.CreateDataStore(connection.p, L"");
 			connection->Close();
 		}
 		catch(...){}
 
         // Now open the database with the given 
-        connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+        connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
         connection->Open();
 
         // Now check the schema.
@@ -161,7 +161,7 @@
         // for debugging.
         FdoIoMemoryStreamP schemaStream = FdoIoMemoryStream::Create();
         schemas->WriteXml(schemaStream);
-		pOdbcSetup.DestroyDataStore(connection.p, "");
+		pOdbcSetup.DestroyDataStore(connection.p, L"");
 		connection->Close();
     }
     catch (FdoException *ex)
@@ -180,12 +180,12 @@
 	OdbcBaseSetup pOdbcSetup(DataBaseType_Oracle);
 	try
 	{
-		FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_OraSetup, "");
+		FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_OraSetup);
 		// Create/open primary connection:
 		FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
 		connection->SetConnectionString ( userConnectString);
 		connection->Open();
-		pOdbcSetup.CreateDataStore(connection.p, "");
+		pOdbcSetup.CreateDataStore(connection.p, L"");
 		connection->Close();
 	}
     catch (FdoException *ex)
@@ -205,7 +205,7 @@
         connection->SetConfiguration(fileStream);
 
         // Now open the database with the given 
-        connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+        connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
         connection->Open();
 
         // Now analyse the schema with the mappings in place.
@@ -569,7 +569,7 @@
     try
     {
         mConnection = UnitTestUtil::GetProviderConnectionObject();
-		mConnection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+		mConnection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
         mConnection->Open();
     }
     catch (FdoException *ex)

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoDeleteTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoDeleteTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoDeleteTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -67,15 +67,15 @@
             StringConnTypeRequest connectionType = Connection_NoDatastore;
             if (DataBaseType_Oracle == mSetup.GetTypeDB() )
                 connectionType = Connection_OraSetup;
-		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType, "") );
+		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType) );
 		    mConnection->Open();
-		    mSetup.CreateDataStore(mConnection, "");
+		    mSetup.CreateDataStore(mConnection, L"");
 		    mSetup.CreateAcadSchema(mConnection);
 		    mSetup.CreateNonAcadSchema(mConnection);
 
 		    mConnection->Close();
         }
-		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN, "") );
+		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN) );
 		mConnection->Open();
     }
     catch (FdoException *ex)

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoInsertTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoInsertTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoInsertTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -72,15 +72,15 @@
             StringConnTypeRequest connectionType = Connection_NoDatastore;
             if (DataBaseType_Oracle == mSetup.GetTypeDB() )
                 connectionType = Connection_OraSetup;
-		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType, "") );
+		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType) );
 		    mConnection->Open();
-		    mSetup.CreateDataStore(mConnection, "");
+		    mSetup.CreateDataStore(mConnection, L"");
 		    mSetup.CreateAcadSchema(mConnection);
 		    mSetup.CreateNonAcadSchema(mConnection);
 
 		    mConnection->Close();
         }
-		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN, "") );
+		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN) );
 		mConnection->Open();
     }
     catch (FdoException *ex)

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoMultiThreadTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoMultiThreadTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoMultiThreadTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -113,14 +113,14 @@
     if (!m_SetupDone)
     {
 	    OdbcBaseSetup pOdbcSetup(DataBaseType_Oracle);
-	    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_OraSetup, "") );
+	    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_OraSetup) );
 	    mConnection->Open();
-	    pOdbcSetup.CreateDataStore(mConnection, "");
+	    pOdbcSetup.CreateDataStore(mConnection, L"");
 	    mConnection->Close();
         m_SetupDone = true;
     }
     // open with DSN
-    mConnection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+    mConnection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
     mConnection->Open();
 	return mConnection;
 }
@@ -150,7 +150,7 @@
 FdoIConnection * OdbcAccessFdoMultiThreadTest::GetConnection()
 {
     FdoIConnection* mConnection = UnitTestUtil::GetProviderConnectionObject();
-	mConnection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+	mConnection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
     mConnection->Open();
 	return mConnection;
 }

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSchemaTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSchemaTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSchemaTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -21,7 +21,7 @@
 #include "UnitTestUtil.h"
 #include "OdbcBaseSetup.h"
 
-#define DB_SUFFIX "_nometaschema"
+#define DB_SUFFIX L"_nometaschema"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( OdbcMySqlFdoSchemaTest );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( OdbcMySqlFdoSchemaTest, "FdoSchemaTest");
@@ -45,7 +45,7 @@
     // Drop the old datastore, if it exists:
     try
     {
-        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+        FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
         FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
         connection->SetConnectionString( userConnectString );
         connection->Open();
@@ -63,7 +63,7 @@
         // Create a datastore (will create metaschema tables automatically, unfortunately):
 		try
 		{
-			FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore, "");
+			FdoStringP userConnectString = UnitTestUtil::GetConnectionString(Connection_NoDatastore);
 			FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
 			connection->SetConnectionString( userConnectString );
 			connection->Open();

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -84,15 +84,15 @@
             StringConnTypeRequest connectionType = Connection_NoDatastore;
             if (DataBaseType_Oracle == mSetup.GetTypeDB() )
                 connectionType = Connection_OraSetup;
-		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType, "") );
+		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType) );
 		    mConnection->Open();
-		    mSetup.CreateDataStore(mConnection, "");
+		    mSetup.CreateDataStore(mConnection, L"");
 		    mSetup.CreateAcadSchema(mConnection);
 		    mSetup.CreateNonAcadSchema(mConnection);
 
 		    mConnection->Close();
         }
-		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN, "") );
+		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN) );
 		mConnection->Open();
     }
     catch (FdoException *ex)

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h	2007-01-26 22:18:18 UTC (rev 692)
@@ -62,7 +62,7 @@
 
     virtual void _duplicateComputedIdTest() {
         // determine feature class name:
-        FdoStringP schemaName = FdoStringP(UnitTestUtil::GetEnviron("datastore")).Upper();
+        FdoStringP schemaName = UnitTestUtil::GetEnviron("datastore").Upper();
 #ifdef _WIN32
         FdoStringP fcn = schemaName + L":ACDB3DPOLYLINE";
 #else
@@ -75,7 +75,7 @@
 
     virtual void _secondComputedIdTest() {
         // determine feature class name:
-        FdoStringP schemaName = FdoStringP(UnitTestUtil::GetEnviron("datastore")).Upper();
+        FdoStringP schemaName = UnitTestUtil::GetEnviron("datastore").Upper();
 #ifdef _WIN32
         FdoStringP fcn = schemaName + L":ACDB3DPOLYLINE";
 #else

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSqlCmdTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSqlCmdTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSqlCmdTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -42,10 +42,17 @@
 	// here we use DSN, we can not call UnitTestUtil::GetConnectionString
 	static wchar_t connectString[200];
 	connectString[0] = L'\0';
-    char *dsnname = UnitTestUtil::GetEnviron("dsnname");
-    char *username = UnitTestUtil::GetEnviron("username");
-    char *password = UnitTestUtil::GetEnviron("password");
-	swprintf( connectString, sizeof(connectString)/sizeof(wchar_t), L"DataSourceName=%hs;UserId=%hs;Password=%hs;", dsnname, username, password);
+    FdoStringP dsnname = UnitTestUtil::GetEnviron("dsnname");
+    FdoStringP username = UnitTestUtil::GetEnviron("username");
+    FdoStringP password = UnitTestUtil::GetEnviron("password");
+	swprintf( 
+        connectString, 
+        sizeof(connectString)/sizeof(wchar_t), 
+        L"DataSourceName=%ls;UserId=%ls;Password=%ls;", 
+        (FdoString*) dsnname, 
+        (FdoString*) username, 
+        (FdoString*) password
+    );
 	return connectString;
 }
 

Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoUpdateTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoUpdateTest.cpp	2007-01-26 21:31:34 UTC (rev 691)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoUpdateTest.cpp	2007-01-26 22:18:18 UTC (rev 692)
@@ -79,15 +79,15 @@
             StringConnTypeRequest connectionType = Connection_NoDatastore;
             if (DataBaseType_Oracle == mSetup.GetTypeDB() )
                 connectionType = Connection_OraSetup;
-		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType, "") );
+		    mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(connectionType) );
 		    mConnection->Open();
-		    mSetup.CreateDataStore(mConnection, "");
+		    mSetup.CreateDataStore(mConnection, L"");
 		    mSetup.CreateAcadSchema(mConnection);
 		    mSetup.CreateNonAcadSchema(mConnection);
 
 		    mConnection->Close();
         }
-		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN, "") );
+		mConnection->SetConnectionString ( UnitTestUtil::GetConnectionString(Connection_WithDSN) );
 		mConnection->Open();
     }
     catch (FdoException *ex)
@@ -254,7 +254,7 @@
     try
     {
         FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
-		connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+		connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
         connection->Open();
         FdoPtr<FdoIUpdate> updateCommand =
             (FdoIUpdate *) connection->CreateCommand(FdoCommandType_Update);
@@ -291,7 +291,7 @@
     try
     {
         FdoPtr<FdoIConnection> connection = UnitTestUtil::GetProviderConnectionObject();
-		connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN, ""));
+		connection->SetConnectionString(UnitTestUtil::GetConnectionString(Connection_WithDSN));
         connection->Open();
         try
         {



More information about the fdo-commits mailing list