Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Client ODBC

Workaround - specify very small subsecond part

  • Last UpdatedJan 04, 2023
  • 1 minute read

A workaround is possible by specifying a small subsecond part like:

"time" = ''21-Apr-2019 12:30:00.0000001''

Now the corresponding trace file shows no subseconds for the timestamp parameter value being passed:

.
.
.
SQL text from hgopars, id=1, len=75 ...
00: 53454C45 43542022 74696D65 222C2276 [SELECT "time","v]
10: 616C7565 222C2274 696D6532 222C224E [alue","time2","N]
20: 616D6522 2046524F 4D202253 414D504C [ame" FROM "SAMPL]
30: 45445641 4C554556 49455722 20574845 [EDVALUEVIEW" WHE]
40: 52452022 74696D65 223D3F [RE "time"=?]
Exiting hgopars, rc=0 at 2019/05/13-15:55:48
Entered hgoopen, cursor id 1 at 2019/05/13-15:55:48
hgoopen, line 89: Printing hoada @ 00000090F7320A58
MAX:1, ACTUAL:1, BRC:1, WHT=3 (BIND_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
93 TIMESTAMP N 16 0 0/ 0 0 0 0 ?
Entered hgoprbv at 2019/05/13-15:55:48
hgoprbv, line 216: Printing hoada @ 00000090F7320A58
MAX:1, ACTUAL:1, BRC:1, WHT=3 (BIND_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
93 TIMESTAMP N 16 0 0/ 0 0 0 0 ?
Entered WP_SQLBindParameter at 2019/05/13-15:55:48
ParameterNumber 1, InputOutputType 1, ValueType 93, ParameterType 93,
ColumnSize 19, DecimalDigits 0, BufferLength 16,StrLen_or_IndPtr 0x00000090F7317FF0 (*0x10)
(Array size: 1)
16 bytes of data at 0x00000090F7314CC0....
.

TitleResults for “How to create a CRG?”Also Available in