Lines Matching refs:H

36 	pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data;  in dblib_fetch_error()  local
37 pdo_dblib_err *einfo = &H->err; in dblib_fetch_error()
77 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_closer() local
79 if (H) { in dblib_handle_closer()
80 pdo_dblib_err_dtor(&H->err); in dblib_handle_closer()
81 if (H->link) { in dblib_handle_closer()
82 dbclose(H->link); in dblib_handle_closer()
83 H->link = NULL; in dblib_handle_closer()
85 if (H->login) { in dblib_handle_closer()
86 dbfreelogin(H->login); in dblib_handle_closer()
87 H->login = NULL; in dblib_handle_closer()
89 pefree(H, dbh->is_persistent); in dblib_handle_closer()
96 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_preparer() local
99 S->H = H; in dblib_handle_preparer()
111 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_doer() local
114 dbsetuserdata(H->link, (BYTE*)&H->err); in dblib_handle_doer()
116 if (FAIL == dbcmd(H->link, ZSTR_VAL(sql))) { in dblib_handle_doer()
120 if (FAIL == dbsqlexec(H->link)) { in dblib_handle_doer()
124 resret = dbresults(H->link); in dblib_handle_doer()
130 ret = dbnextrow(H->link); in dblib_handle_doer()
135 if (dbnumcols(H->link) <= 0) { in dblib_handle_doer()
136 return DBCOUNT(H->link); in dblib_handle_doer()
140 dbcanquery(H->link); in dblib_handle_doer()
142 return DBCOUNT(H->link); in dblib_handle_doer()
147 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_quoter() local
154 if (H->assume_national_character_set_strings) { in dblib_handle_quoter()
203 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in pdo_dblib_transaction_cmd() local
205 if (FAIL == dbcmd(H->link, cmd)) { in pdo_dblib_transaction_cmd()
209 if (FAIL == dbsqlexec(H->link)) { in pdo_dblib_transaction_cmd()
233 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_last_id() local
244 if (FAIL == dbcmd(H->link, "SELECT @@IDENTITY")) { in dblib_handle_last_id()
248 if (FAIL == dbsqlexec(H->link)) { in dblib_handle_last_id()
252 ret = dbresults(H->link); in dblib_handle_last_id()
254 dbcancel(H->link); in dblib_handle_last_id()
258 ret = dbnextrow(H->link); in dblib_handle_last_id()
261 dbcancel(H->link); in dblib_handle_last_id()
265 if (dbdatlen(H->link, 1) == 0) { in dblib_handle_last_id()
266 dbcancel(H->link); in dblib_handle_last_id()
271 …len = dbconvert(NULL, (dbcoltype(H->link, 1)) , (dbdata(H->link, 1)) , (dbdatlen(H->link, 1)), SQL… in dblib_handle_last_id()
272 dbcancel(H->link); in dblib_handle_last_id()
281 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_set_attr() local
290 H->assume_national_character_set_strings = lval == PDO_PARAM_STR_NATL ? 1 : 0; in dblib_set_attr()
302 H->stringify_uniqueidentifier = bval; in dblib_set_attr()
308 H->skip_empty_rowsets = bval; in dblib_set_attr()
314 H->datetime_convert = bval; in dblib_set_attr()
390 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_get_attribute() local
394 …ZVAL_LONG(return_value, H->assume_national_character_set_strings ? PDO_PARAM_STR_NATL : PDO_PARAM_… in dblib_get_attribute()
403 ZVAL_BOOL(return_value, H->stringify_uniqueidentifier); in dblib_get_attribute()
411 dblib_get_tds_version(return_value, dbtds(H->link)); in dblib_get_attribute()
415 ZVAL_BOOL(return_value, H->skip_empty_rowsets); in dblib_get_attribute()
419 ZVAL_BOOL(return_value, H->datetime_convert); in dblib_get_attribute()
451 pdo_dblib_db_handle *H; in pdo_dblib_handle_factory() local
494 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_dblib_handle_factory()
495 H->login = dblogin(); in pdo_dblib_handle_factory()
496 H->err.sqlstate = dbh->error_code; in pdo_dblib_handle_factory()
497 H->assume_national_character_set_strings = 0; in pdo_dblib_handle_factory()
498 H->stringify_uniqueidentifier = 0; in pdo_dblib_handle_factory()
499 H->skip_empty_rowsets = 0; in pdo_dblib_handle_factory()
500 H->datetime_convert = 0; in pdo_dblib_handle_factory()
502 if (!H->login) { in pdo_dblib_handle_factory()
521H->assume_national_character_set_strings = pdo_attr_lval(driver_options, PDO_ATTR_DEFAULT_STR_PARA… in pdo_dblib_handle_factory()
522H->stringify_uniqueidentifier = pdo_attr_lval(driver_options, PDO_DBLIB_ATTR_STRINGIFY_UNIQUEIDENT… in pdo_dblib_handle_factory()
523 H->skip_empty_rowsets = pdo_attr_lval(driver_options, PDO_DBLIB_ATTR_SKIP_EMPTY_ROWSETS, 0); in pdo_dblib_handle_factory()
524 H->datetime_convert = pdo_attr_lval(driver_options, PDO_DBLIB_ATTR_DATETIME_CONVERT, 0); in pdo_dblib_handle_factory()
527 DBERRHANDLE(H->login, (EHANDLEFUNC) pdo_dblib_error_handler); in pdo_dblib_handle_factory()
528 DBMSGHANDLE(H->login, (MHANDLEFUNC) pdo_dblib_msg_handler); in pdo_dblib_handle_factory()
533 if(FAIL==dbsetlversion(H->login, tdsver[i].value)) { in pdo_dblib_handle_factory()
553 if(FAIL == DBSETLUSER(H->login, dbh->username)) { in pdo_dblib_handle_factory()
563 if(FAIL == DBSETLPWD(H->login, dbh->password)) { in pdo_dblib_handle_factory()
570 DBSETLCHARSET(H->login, vars[0].optval); in pdo_dblib_handle_factory()
574 DBSETLAPP(H->login, vars[1].optval); in pdo_dblib_handle_factory()
579 if(FAIL == DBSETLDBNAME(H->login, vars[3].optval)) goto cleanup; in pdo_dblib_handle_factory()
583 H->link = dbopen(H->login, vars[2].optval); in pdo_dblib_handle_factory()
585 if (!H->link) { in pdo_dblib_handle_factory()
595 if(FAIL == dbuse(H->link, vars[3].optval)) goto cleanup; in pdo_dblib_handle_factory()
601 DBSETOPT(H->link, DBTEXTLIMIT, "2147483647"); in pdo_dblib_handle_factory()
605 DBSETOPT(H->link, DBTEXTSIZE, "2147483647"); in pdo_dblib_handle_factory()
608 DBSETOPT(H->link, DBQUOTEDIDENT, "1"); in pdo_dblib_handle_factory()
622 dbh->driver_data = H; in pdo_dblib_handle_factory()