Line data Source code
1 : /* test SQLGetDescRec */
2 : #include "common.h"
3 :
4 10 : TEST_MAIN()
5 : {
6 : SQLHDESC Descriptor;
7 : SQLINTEGER ind;
8 : SQLTCHAR name[128];
9 : SQLSMALLINT si;
10 :
11 10 : odbc_use_version3 = true;
12 10 : odbc_connect();
13 :
14 10 : odbc_command("create table #tmp1 (i int)");
15 :
16 : /* get IRD */
17 10 : CHKGetStmtAttr(SQL_ATTR_IMP_ROW_DESC, &Descriptor, sizeof(Descriptor), &ind, "S");
18 :
19 10 : CHKGetDescRec(-1, name, TDS_VECTOR_SIZE(name), &si, NULL, NULL, NULL, NULL, NULL, NULL, "E");
20 : /* TODO here should be NO_DATA cause we are requesting bookmark */
21 : /* CHKGetDescRec(0, name, sizeof(name), &si, NULL, NULL, NULL, NULL, NULL, NULL, "No"); */
22 10 : CHKGetDescRec(1, name, TDS_VECTOR_SIZE(name), &si, NULL /*Type*/, NULL /*SubType*/, NULL /*Length*/, NULL/*Precision*/,
23 : NULL /*Scale*/, NULL /*Nullable*/, "No");
24 :
25 10 : odbc_command("SELECT name FROM sysobjects");
26 :
27 10 : CHKGetDescRec(1, name, TDS_VECTOR_SIZE(name), &si, NULL /*Type*/, NULL /*SubType*/, NULL /*Length*/, NULL/*Precision*/,
28 : NULL /*Scale*/, NULL /*Nullable*/, "S");
29 :
30 10 : odbc_disconnect();
31 10 : ODBC_FREE();
32 10 : return 0;
33 : }
34 :
|