[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fdo-commits
Subject:    [fdo-commits] r5833 -
From:       svn_fdo () osgeo ! org
Date:       2010-11-25 18:41:21
Message-ID: 20101125184122.0090D390398 () trac ! osgeo ! org
[Download RAW message or body]

Author: brentrobinson
Date: 2010-11-25 10:41:21 -0800 (Thu, 25 Nov 2010)
New Revision: 5833

Modified:
   trunk/Providers/GenericRdbms/Src/SQLServerSpatial/ODBCDriver/bind.c
Log:
Ticket#729: Set SQL type to varying character when bind variable is variable length \
string.

Modified: trunk/Providers/GenericRdbms/Src/SQLServerSpatial/ODBCDriver/bind.c
===================================================================
--- trunk/Providers/GenericRdbms/Src/SQLServerSpatial/ODBCDriver/bind.c	2010-11-24 \
                16:04:00 UTC (rev 5832)
+++ trunk/Providers/GenericRdbms/Src/SQLServerSpatial/ODBCDriver/bind.c	2010-11-25 \
18:41:21 UTC (rev 5833) @@ -170,8 +170,19 @@
 		)
 	{
 		debug3 ("\nError=%d in SQLDescribeParam() for '%s', type=%d. Assuming type = \
                SQL_CHAR, length = 100\n", rc, name, sql_type );
-		// most SQL types can be converted to SQL_CHAR
-		sql_type = SQL_CHAR;
+        switch (odbcdr_datatype)
+        {
+        case SQL_C_WCHAR:
+    		sql_type = SQL_WVARCHAR;
+            break;
+        case SQL_C_CHAR:
+    		sql_type = SQL_VARCHAR;
+            break;
+        default:
+    		// most SQL types can be converted to SQL_CHAR
+            sql_type = SQL_CHAR;
+            break;
+        }
 		col_size = 100;
 		decimal_digits = 0;
 	}

_______________________________________________
fdo-commits mailing list
fdo-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic