Skip to main content

%Library.SQLConnection

persistent class %Library.SQLConnection extends %Library.Persistent, %XML.Adaptor

SQL Table Name: %Library.sys_SQLConnection

Property Inventory

Method Inventory

Properties

property DSN as %String (CAPTION = "DSN", MAXLEN = 256);
Property methods: DSNDisplayToLogical(), DSNGet(), DSNGetStored(), DSNIsValid(), DSNLogicalToDisplay(), DSNLogicalToOdbc(), DSNNormalize(), DSNSet()
property Name as %String (CAPTION = "Connection Name") [ SqlFieldName = Connection_Name , Required ];
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property OnConnectStatement as %String (CAPTION = "Statement to execute upon connection", MAXLEN = 4096);
Statement to execute on remote system immediately after connection. This is only for a Gateway conenction through %Library.GTWConnection.Connect() method. An example usage of this would be to set a session parameter on an Oracle connection: ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF6'
Property methods: OnConnectStatementDisplayToLogical(), OnConnectStatementGet(), OnConnectStatementGetStored(), OnConnectStatementIsValid(), OnConnectStatementLogicalToDisplay(), OnConnectStatementLogicalToOdbc(), OnConnectStatementNormalize(), OnConnectStatementSet()
property ReverseOJ as %Boolean (CAPTION = "Legacy Sybase outer join syntax");
Property methods: ReverseOJDisplayToLogical(), ReverseOJGet(), ReverseOJGetStored(), ReverseOJIsValid(), ReverseOJLogicalToDisplay(), ReverseOJLogicalToXSD(), ReverseOJNormalize(), ReverseOJSet(), ReverseOJXSDToLogical()
property URL as %String (CAPTION = "URL", MAXLEN = 4096);
Property methods: URLDisplayToLogical(), URLGet(), URLGetStored(), URLIsValid(), URLLogicalToDisplay(), URLLogicalToOdbc(), URLNormalize(), URLSet()
property Usr as %String (CAPTION = "User");
Property methods: UsrDisplayToLogical(), UsrGet(), UsrGetStored(), UsrIsValid(), UsrLogicalToDisplay(), UsrLogicalToOdbc(), UsrNormalize(), UsrSet()
property bUnicodeStream as %Boolean (CAPTION = "Supports Unicode Streams") [ InitialExpression = 1 ];
Property methods: bUnicodeStreamDisplayToLogical(), bUnicodeStreamGet(), bUnicodeStreamGetStored(), bUnicodeStreamIsValid(), bUnicodeStreamLogicalToDisplay(), bUnicodeStreamLogicalToXSD(), bUnicodeStreamNormalize(), bUnicodeStreamSet(), bUnicodeStreamXSDToLogical()
property bindTSasString as %Boolean (CAPTION = "Bind TIMESTAMP parameters as VARCHAR") [ InitialExpression = 0 ];
Bind TIMESTAMP type parmaters as VARCHAR. When binding parameter values via the GateWay, some remote systems consider TIMESTAMP as a special structure that does not match the the %TimeStamp datatype format of YYYY-MM-DD HH24:MI;SS[.ssssss]. Setting this property to 1 will bind TIMESTAMP parameters as VARCHARs instead of TIMESTAMP. You might need this setting when binding TIMESTAMP parameters to Oracle, depending on the Oracle driver used.
Property methods: bindTSasStringDisplayToLogical(), bindTSasStringGet(), bindTSasStringGetStored(), bindTSasStringIsValid(), bindTSasStringLogicalToDisplay(), bindTSasStringLogicalToXSD(), bindTSasStringNormalize(), bindTSasStringSet(), bindTSasStringXSDToLogical()
property classpath as %Library.String (CAPTION = "Class Path", MAXLEN = 4096);
Property methods: classpathDisplayToLogical(), classpathGet(), classpathGetStored(), classpathIsValid(), classpathLogicalToDisplay(), classpathLogicalToOdbc(), classpathNormalize(), classpathSet()
property driver as %String (CAPTION = "driver", MAXLEN = 256);
Property methods: driverDisplayToLogical(), driverGet(), driverGetStored(), driverIsValid(), driverLogicalToDisplay(), driverLogicalToOdbc(), driverNormalize(), driverSet()
property isJDBC as %Boolean (CAPTION = "Is JDBC connection");
Property methods: isJDBCDisplayToLogical(), isJDBCGet(), isJDBCGetStored(), isJDBCIsValid(), isJDBCLogicalToDisplay(), isJDBCLogicalToXSD(), isJDBCNormalize(), isJDBCSet(), isJDBCXSDToLogical()
property needlongdatalen as %Boolean (CAPTION = "Needs long data length");
Property methods: needlongdatalenDisplayToLogical(), needlongdatalenGet(), needlongdatalenGetStored(), needlongdatalenIsValid(), needlongdatalenLogicalToDisplay(), needlongdatalenLogicalToXSD(), needlongdatalenNormalize(), needlongdatalenSet(), needlongdatalenXSDToLogical()
property noconcat as %Boolean (CAPTION = "Do not generate {fn concat()}");
Property methods: noconcatDisplayToLogical(), noconcatGet(), noconcatGetStored(), noconcatIsValid(), noconcatLogicalToDisplay(), noconcatLogicalToXSD(), noconcatNormalize(), noconcatSet(), noconcatXSDToLogical()
property nodefq as %Boolean (CAPTION = "Do not use delimited identifiers by default");
Property methods: nodefqDisplayToLogical(), nodefqGet(), nodefqGetStored(), nodefqIsValid(), nodefqLogicalToDisplay(), nodefqLogicalToXSD(), nodefqNormalize(), nodefqSet(), nodefqXSDToLogical()
property nofnconv as %Boolean (CAPTION = "Do not generate {fn conv ...} by default");
Property methods: nofnconvDisplayToLogical(), nofnconvGet(), nofnconvGetStored(), nofnconvIsValid(), nofnconvLogicalToDisplay(), nofnconvLogicalToXSD(), nofnconvNormalize(), nofnconvSet(), nofnconvXSDToLogical()
property nvl as %Boolean (CAPTION = "Use NVL() instead of IFNULL()");
Property methods: nvlDisplayToLogical(), nvlGet(), nvlGetStored(), nvlIsValid(), nvlLogicalToDisplay(), nvlLogicalToXSD(), nvlNormalize(), nvlSet(), nvlXSDToLogical()
property properties as %Library.String (CAPTION = "Properties", MAXLEN = 256);
Property methods: propertiesDisplayToLogical(), propertiesGet(), propertiesGetStored(), propertiesIsValid(), propertiesLogicalToDisplay(), propertiesLogicalToOdbc(), propertiesNormalize(), propertiesSet()
property pwd as %CSP.Util.Passwd (CAPTION = "Password");
Property methods: pwdDisplayToLogical(), pwdGet(), pwdGetStored(), pwdIsValid(), pwdLogicalToDisplay(), pwdLogicalToOdbc(), pwdNormalize(), pwdSet()
property useCAST as %Boolean (CAPTION = "Use CAST as VARCHAR");
Property methods: useCASTDisplayToLogical(), useCASTGet(), useCASTGetStored(), useCASTIsValid(), useCASTLogicalToDisplay(), useCASTLogicalToXSD(), useCASTNormalize(), useCASTSet(), useCASTXSDToLogical()
property useCASTCHAR as %Boolean (CAPTION = "Use CAST as CHAR");
Property methods: useCASTCHARDisplayToLogical(), useCASTCHARGet(), useCASTCHARGetStored(), useCASTCHARIsValid(), useCASTCHARLogicalToDisplay(), useCASTCHARLogicalToXSD(), useCASTCHARNormalize(), useCASTCHARSet(), useCASTCHARXSDToLogical()
property useCOALESCE as %Boolean (CAPTION = "Use COALESCE") [ InitialExpression = 1 ];
Property methods: useCOALESCEDisplayToLogical(), useCOALESCEGet(), useCOALESCEGetStored(), useCOALESCEIsValid(), useCOALESCELogicalToDisplay(), useCOALESCELogicalToXSD(), useCOALESCENormalize(), useCOALESCESet(), useCOALESCEXSDToLogical()
property xadriver as %String (CAPTION = "driver", MAXLEN = 256);
Property methods: xadriverDisplayToLogical(), xadriverGet(), xadriverGetStored(), xadriverIsValid(), xadriverLogicalToDisplay(), xadriverLogicalToOdbc(), xadriverNormalize(), xadriverSet()

Methods

classmethod ConnExists(nm As %String) as %Boolean
method setEncode(val As %Boolean)

Queries

query ByConnection()
Selects Connection_Name, DSN, User, ID
SQL Query:
SELECT Connection_Name, DSN, usr, %ID FROM %Library.sys_SQLConnection WHERE Connection_Name is not null ORDER BY Connection_Name
Lookup by Connection name without input parameter
query ByName(name As %String = "")
Selects Connection_Name, DSN, User, ID, isJDBC
SQL Query:
SELECT Connection_Name, DSN, usr, %ID, isJDBC FROM %Library.sys_SQLConnection WHERE Connection_Name %STARTSWITH %ALPHAUP(:name) ORDER BY Connection_Name
Lookup by Connection name

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (NameIndex on Name) [Unique];
Index for property Name
Index methods: NameIndexCheck(), NameIndexCheckUnique(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (%Library.SQLConnection)

^%SYS("sql","ODBCCONNECTION","DATA")(ID)
=
%%CLASSNAME
DSN
Name
Usr
pwd
ReverseOJ
isJDBC
URL
driver
classpath
properties
useCAST
xadriver
nodefq
nofnconv
useCOALESCE
needlongdatalen
bUnicodeStream
useCASTCHAR
noconcat
nvl
bindTSasString
OnConnectStatement
FeedbackOpens in a new tab