[fdo-commits] r638 - in branches/3.2.x/Providers/GenericRdbms: Nls
Src/ODBCDriver
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Tue Jan 16 15:29:06 EST 2007
Author: jacklee
Date: 2007-01-16 15:29:06 -0500 (Tue, 16 Jan 2007)
New Revision: 638
Modified:
branches/3.2.x/Providers/GenericRdbms/Nls/fdordbmsmsg.mc
branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/get_msg.c
Log:
Externalize "No current Open Database" message
Modified: branches/3.2.x/Providers/GenericRdbms/Nls/fdordbmsmsg.mc
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Nls/fdordbmsmsg.mc 2007-01-16 19:19:43 UTC (rev 637)
+++ branches/3.2.x/Providers/GenericRdbms/Nls/fdordbmsmsg.mc 2007-01-16 20:29:06 UTC (rev 638)
@@ -1805,3 +1805,8 @@
Language=English
Unknown MySQL server host '%1$ls'
.
+MessageId=2731
+SymbolicName=FDORDBMS_506
+Language=English
+No current open database.
+.
Modified: branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/get_msg.c
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/get_msg.c 2007-01-16 19:19:43 UTC (rev 637)
+++ branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/get_msg.c 2007-01-16 20:29:06 UTC (rev 638)
@@ -38,17 +38,31 @@
* Void. *
* *
************************************************************************/
-
+#include <Fdo.h>
+#include <Inc/Nls/fdordbms_msg.h>
#include <Inc/ut.h> /* ut_vm_malloc() */
#include <Inc/rdbi.h> /* rdbi status values */
#include <Inc/debugext.h>
#include "proto_p.h"
-#define MSG_NODBOPEN "No current open database."
-#define MSG_NODBOPENW L"No current open database."
#define MSG_EMPTY ""
#define MSG_EMPTYW L""
+
+extern char *fdordbms_cat;
+
+const wchar_t* ocdcdr_nls_msg_get(int msg_num, char* default_msg, ...)
+{
+ FdoString *ret = NULL;
+ va_list varargs;
+ va_start(varargs, default_msg);
+ ret = FdoException::NLSGetMessage(msg_num, default_msg, MF_FDORDBMS, varargs
+);
+ va_end(varargs);
+ return ret;
+}
+
+
void local_odbcdr_get_msg(odbcdr_context_def *context, rdbi_string_def *buffer)
{
int rs;
@@ -61,7 +75,10 @@
if ( rs == RDBI_NOT_CONNECTED )
{
- ODBCDRV_STRING_COPY_LST( buffer, MSG_NODBOPEN );
+ if (context->odbcdr_UseUnicode)
+ wcscpy(buffer->wString, ocdcdr_nls_msg_get(FDORDBMS_506, "No current open database."));
+ else
+ strcpy(buffer->cString, FdoStringP(ocdcdr_nls_msg_get(FDORDBMS_506, "No current open database.")));
}
else if ( rs == RDBI_SUCCESS )
{
More information about the fdo-commits
mailing list