v5:reference:connection:adonewconnection
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
v5:reference:connection:adonewconnection [2016/01/17 03:29] – mnewnham | v5:reference:connection:adonewconnection [2017/04/14 10:22] – [Table] fix table layout dregad | ||
---|---|---|---|
Line 2: | Line 2: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
<WRAP right box> | <WRAP right box> | ||
- | == Syntax | + | == Syntax == |
| | ||
mixed adoNewConnection( | mixed adoNewConnection( | ||
Line 8: | Line 8: | ||
) | ) | ||
- | == Syntax version 6.0.0 == | ||
- | mixed adoNewConnection( | ||
- | string $driverType | ||
- | ) | ||
</ | </ | ||
===== Description ===== | ===== Description ===== | ||
Line 56: | Line 52: | ||
The following additional parameter can be added to the DSN connection string. Some of the parameters only work with specific drivers. | The following additional parameter can be added to the DSN connection string. Some of the parameters only work with specific drivers. | ||
- | ^Code^Value^Parameter^Description^ | + | ^ Code |
- | |new|true|[[v5: | + | | new | true |
- | |persist|true|[[v5: | + | | persist |
- | |persistent|true|[[v5: | + | | persistent |
- | |debug|true|[[v5: | + | | debug | true |
- | |role|string||When using the ibase driver, allows setting a role| | + | | role |
- | |dialect|integer||Undocumented option| | + | | dialect |
- | |charset|string|[[v5: | + | | charset |
- | |buffers|string||Undocumented option| | + | | buffers |
- | |fetchmode|int|[[v5: | + | | fetchmode |
- | |charpage|string||Undocumented option| | + | | charpage |
- | |clientflags|string||Undocumented option| | + | | clientflags |
- | |port|int||Sets the connection port| | + | | port |
- | |socket|int||Sets the connection socket| | + | | socket |
- | |nls_date_format|string|Set date format| | + | | nls_date_format |
- | |cachesecs|int|Sets the number of cache seconds| | + | | cachesecs |
- | |memcache|string||Undocumented series of options| | + | | memcache |
===== Error Codes ===== | ===== Error Codes ===== | ||
- | As of version 6.0.0 , the following error codes will be returned if a connection fails. | ||
- | |||
- | ^Code^Description^ | ||
- | |-1|An invalid driver name was given| | ||
- | |-2|Unable to parse DSN string| | ||
- | |-3|Connection to database via DSN string failed| | ||
- | |-4|DSN option not supported by driver| | ||
- | |||
Note that, because no connection object is available, the codes cannot be retrieved via [[v5: | Note that, because no connection object is available, the codes cannot be retrieved via [[v5: | ||
v5/reference/connection/adonewconnection.txt · Last modified: 2020/12/08 10:39 by peterdd