Modified:
trunk/ChangeLog
trunk/driver/myodbc3.def
trunk/driver/prepare.c
trunk/test/my_prepare.c
Log:
Added deprecated SQLSetParam function, .def file updated (Bug #29871)
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-02-20 17:35:30 UTC (rev 1037)
+++ trunk/ChangeLog 2008-02-20 19:01:34 UTC (rev 1038)
@@ -12,6 +12,7 @@
for characters. (Bug #32864)
* SSL connections could not be established properly. Added the server
certificate verification flag. (Bug #29955)
+ * Added deprecated SQLSetParam function. (Bug #29871)
----
Modified: trunk/driver/myodbc3.def
===================================================================
--- trunk/driver/myodbc3.def 2008-02-20 17:35:30 UTC (rev 1037)
+++ trunk/driver/myodbc3.def 2008-02-20 19:01:34 UTC (rev 1038)
@@ -118,6 +118,7 @@
;SQLGetDescField
;SQLGetDescRec
SQLCloseCursor
+SQLSetParam
;
DllMain
LoadByOrdinal
@@ -127,3 +128,4 @@
+
Modified: trunk/driver/prepare.c
===================================================================
--- trunk/driver/prepare.c 2008-02-20 17:35:30 UTC (rev 1037)
+++ trunk/driver/prepare.c 2008-02-20 19:01:34 UTC (rev 1038)
@@ -292,6 +292,37 @@
}
+/**
+ Deprecated function, for more details see SQLBindParamater.
+
+ @param[in] stmt Handle to statement
+ @param[in] ipar Parameter number
+ @param[in] fCType Value type
+ @param[in] fSqlType Parameter type
+ @param[in] cbColDef Column size
+ @param[in] ibScale Decimal digits
+ @param[in] rgbValue Parameter value pointer
+ @param[in] pcbValue String length or index pointer
+
+ @return SQL_SUCCESS or SQL_ERROR (and diag is set)
+
+*/
+
+SQLRETURN SQL_API SQLSetParam(SQLHSTMT hstmt,
+ SQLUSMALLINT ipar,
+ SQLSMALLINT fCType,
+ SQLSMALLINT fSqlType,
+ SQLULEN cbColDef,
+ SQLSMALLINT ibScale,
+ SQLPOINTER rgbValue,
+ SQLLEN * pcbValue)
+{
+ return my_SQLBindParameter(hstmt, ipar, SQL_PARAM_INPUT_OUTPUT, fCType,
+ fSqlType, cbColDef, ibScale, rgbValue,
+ SQL_SETPARAM_VALUE_MAX, pcbValue);
+}
+
+
/*
@type : ODBC 2.0 API
@purpose : binds a buffer to a parameter marker in an SQL statement.
Modified: trunk/test/my_prepare.c
===================================================================
--- trunk/test/my_prepare.c 2008-02-20 17:35:30 UTC (rev 1037)
+++ trunk/test/my_prepare.c 2008-02-20 19:01:34 UTC (rev 1038)
@@ -1062,6 +1062,10 @@
ok_stmt(hstmt, SQLSetParam(hstmt, 1, SQL_C_CHAR, SQL_INTEGER, 10, 0,
param, 0));
ok_sql(hstmt, "SELECT * FROM t_bug29871 WHERE a=?");
+ ok_stmt(hstmt, SQLFetch(hstmt));
+ is_num(my_fetch_int(hstmt, 1), 1);
+
+ ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE));
ok_sql(hstmt, "DROP TABLE t_bug29871");
return OK;
}
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r1038 - in trunk: . driver test | bdegtyariov | 20 Feb |