Skip to content

Commit

Permalink
Extended C API demo app for OCI_Number
Browse files Browse the repository at this point in the history
  • Loading branch information
vrogier committed Feb 7, 2017
1 parent bc7d9fe commit 98361e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions demo/ocilib_demo.c
Expand Up @@ -1865,6 +1865,13 @@ void test_number()
print_text("\n");
}

// Testing formatting
OCI_NumberFromText(nm, OTEXT("1234.4321"), NULL);
OCI_ImmediateFmt(cn, OTEXT("select %n * 2 from dual"), nm, OCI_ARG_NUMBER, nm);
OCI_NumberToText(nm, NULL, SIZE_STR, str);
print_ostr(str);
print_text("\n");

// Testing array of numbers
OCI_NumberFromText(ar[0], OTEXT("1.2"), NULL);
OCI_NumberFromText(ar[1], OTEXT("~"), NULL);
Expand Down

0 comments on commit 98361e9

Please sign in to comment.