| 1508 | // |
| 1509 | |
| 1510 | static void gen_dyn_open( const act* action, int column) |
| 1511 | { |
| 1512 | gpre_req* request; |
| 1513 | gpre_req req_const; |
| 1514 | |
| 1515 | dyn* statement = (dyn*) action->act_object; |
| 1516 | const TEXT* transaction; |
| 1517 | if (statement->dyn_trans) |
| 1518 | { |
| 1519 | transaction = statement->dyn_trans; |
| 1520 | request = &req_const; |
| 1521 | request->req_trans = transaction; |
| 1522 | } |
| 1523 | else |
| 1524 | { |
| 1525 | transaction = "gds_trans"; |
| 1526 | request = NULL; |
| 1527 | } |
| 1528 | |
| 1529 | TEXT s[MAX_CURSOR_SIZE]; |
| 1530 | make_name(s, statement->dyn_cursor_name); |
| 1531 | |
| 1532 | if (gpreGlob.sw_auto) |
| 1533 | { |
| 1534 | t_start_auto(action, request, status_vector(action), column, true); |
| 1535 | printa(column, "if %s%s /= 0 then", gpreGlob.ada_package, transaction); |
| 1536 | column += INDENT; |
| 1537 | } |
| 1538 | |
| 1539 | if (statement->dyn_sqlda) |
| 1540 | printa(column, "firebird.embed_dsql_open (isc_status, %s%s, %s, %d, %s'address);", |
| 1541 | gpreGlob.ada_package, transaction, s, gpreGlob.sw_sql_dialect, statement->dyn_sqlda); |
| 1542 | else |
| 1543 | printa(column, "firebird.embed_dsql_open (isc_status, %s%s, %s, %d);", |
| 1544 | gpreGlob.ada_package, transaction, s, gpreGlob.sw_sql_dialect); |
| 1545 | |
| 1546 | if (gpreGlob.sw_auto) |
| 1547 | { |
| 1548 | column -= INDENT; |
| 1549 | endif(column); |
| 1550 | } |
| 1551 | |
| 1552 | set_sqlcode(action, column); |
| 1553 | } |
| 1554 | |
| 1555 | |
| 1556 | //____________________________________________________________ |
no test coverage detected