MoMo 2021年6月14日11:08:32
评论
389

dpi_bind_param

函数

DPIRETURN

dpi_bind_param(

dhstmt dpi_hstmt,

udint2 iparam,

sdint2 param_type,

sdint2 ctype,

sdint2 dtype,

ulength precision,

sdint2 scale,

dpointer buf,

slength buf_len,

slength *ind_ptr

);

功能

绑定缓冲区到 SQL 语句中的参数标记。

参数:

1) dpi_hstmt

输入参数,语句句柄

2) iparam

输入参数,参数索引号。起始为 1

3) param_type

输入参数,参数的类型。必须是下列值之一:

  • DSQL_PARAM_INPUT
  • DSQL_PARAM_OUTPUT
  • DSQL_PARAM_INPUT_OUTPUT
  • DSQL_PARAM_INPUT_OUTPUT_STREAM
  • DSQL_PARAM_OUTPUT_STREAM

4) ctype

输入参数,参数的 C 数据类型。

5) dtype

输入参数,参数所对应的数据库的 D 数据类型

6) precision

输入参数,列的宽度或者参数相应域的值。

7) scale

输入参数,列的小数位数或者参数相应域的值。

8) buf

延缓输入参数,指向存放参数数据的缓冲区的指针。

9) buf_len

输入参数,buf 缓冲的字节长度。

10)   ind_ptr

延缓输入参数,指向存储参数长度的缓冲区的指针。

返回值

DSQL_SUCCESS

DSQL_SUCCESS_WITH_INFO

DSQL_ERROR

DSQL_INVALID_HANDLE

说明:

绑定信息将持续作用直到再次调用 dpi_bind_param 或者 dpi_unbind_params

https://xpanx.com/
MoMo
  • 本文由 发表于 2021年6月14日11:08:32
  • 转载请务必保留本文链接:https://xpanx.com/2837.html
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: