Lines Matching refs:H
40 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_fetch_error() local
41 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 if (H->link) { in dblib_handle_closer()
81 dbclose(H->link); in dblib_handle_closer()
82 H->link = NULL; in dblib_handle_closer()
84 if (H->login) { in dblib_handle_closer()
85 dbfreelogin(H->login); in dblib_handle_closer()
86 H->login = NULL; in dblib_handle_closer()
88 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()
110 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_doer() local
113 dbsetuserdata(H->link, (BYTE*)&H->err); in dblib_handle_doer()
115 if (FAIL == dbcmd(H->link, sql)) { in dblib_handle_doer()
119 if (FAIL == dbsqlexec(H->link)) { in dblib_handle_doer()
123 resret = dbresults(H->link); in dblib_handle_doer()
129 ret = dbnextrow(H->link); in dblib_handle_doer()
134 if (dbnumcols(H->link) <= 0) { in dblib_handle_doer()
135 return DBCOUNT(H->link); in dblib_handle_doer()
139 dbcanquery(H->link); in dblib_handle_doer()
141 return DBCOUNT(H->link); in dblib_handle_doer()
146 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_quoter() local
174 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in pdo_dblib_transaction_cmd() local
177 if (FAIL == dbcmd(H->link, cmd)) { in pdo_dblib_transaction_cmd()
181 if (FAIL == dbsqlexec(H->link)) { in pdo_dblib_transaction_cmd()
205 pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; in dblib_handle_last_id() local
214 if (FAIL == dbcmd(H->link, "SELECT @@IDENTITY")) { in dblib_handle_last_id()
218 if (FAIL == dbsqlexec(H->link)) { in dblib_handle_last_id()
222 ret = dbresults(H->link); in dblib_handle_last_id()
224 dbcancel(H->link); in dblib_handle_last_id()
228 ret = dbnextrow(H->link); in dblib_handle_last_id()
231 dbcancel(H->link); in dblib_handle_last_id()
235 if (dbdatlen(H->link, 1) == 0) { in dblib_handle_last_id()
236 dbcancel(H->link); in dblib_handle_last_id()
241 …*len = dbconvert(NULL, (dbcoltype(H->link, 1)) , (dbdata(H->link, 1)) , (dbdatlen(H->link, 1)), SQ… in dblib_handle_last_id()
243 dbcancel(H->link); in dblib_handle_last_id()
267 pdo_dblib_db_handle *H; in pdo_dblib_handle_factory() local
309 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_dblib_handle_factory()
310 H->login = dblogin(); in pdo_dblib_handle_factory()
311 H->err.sqlstate = dbh->error_code; in pdo_dblib_handle_factory()
313 if (!H->login) { in pdo_dblib_handle_factory()
317 DBERRHANDLE(H->login, (EHANDLEFUNC) error_handler); in pdo_dblib_handle_factory()
318 DBMSGHANDLE(H->login, (MHANDLEFUNC) msg_handler); in pdo_dblib_handle_factory()
323 if(FAIL==dbsetlversion(H->login, tdsver[i].value)) { in pdo_dblib_handle_factory()
339 if(FAIL == DBSETLUSER(H->login, dbh->username)) { in pdo_dblib_handle_factory()
345 if(FAIL == DBSETLPWD(H->login, dbh->password)) { in pdo_dblib_handle_factory()
352 DBSETLCHARSET(H->login, vars[0].optval); in pdo_dblib_handle_factory()
356 DBSETLAPP(H->login, vars[1].optval); in pdo_dblib_handle_factory()
361 if(FAIL == DBSETLDBNAME(H->login, vars[3].optval)) goto cleanup; in pdo_dblib_handle_factory()
365 H->link = dbopen(H->login, vars[2].optval); in pdo_dblib_handle_factory()
367 if (!H->link) { in pdo_dblib_handle_factory()
377 if(FAIL == dbuse(H->link, vars[3].optval)) goto cleanup; in pdo_dblib_handle_factory()
383 DBSETOPT(H->link, DBTEXTLIMIT, "2147483647"); in pdo_dblib_handle_factory()
387 DBSETOPT(H->link, DBTEXTSIZE, "2147483647"); in pdo_dblib_handle_factory()
390 DBSETOPT(H->link, DBQUOTEDIDENT, "1"); in pdo_dblib_handle_factory()
404 dbh->driver_data = H; in pdo_dblib_handle_factory()