Tech Tip: ADO ODBC Connection String for Oracle
PRODUCT: 4D | VERSION: 2004.2 | PLATFORM: Win
Published On: August 6, 2005
4D for ADO uses different connection string depending on the datasource. The connection string is then used with the command DBGateway_Connect command to connect to the data source. One of the two ways to interact with a datasource using ADO is through ODBC (the other through OLE DB using providers). Below is an example of a connection string for Oracle and an example for making a connection. Microsoft’s ODBC for Oracle driver is used.
C_TEXT($ConnStr)
$ConnStr:="Driver={Microsoft ODBC for Oracle};"
$ConnStr:=$ConnStr+"Server=OracleServer;"
$ConnStr:=$ConnStr+"Uid=UserName;"
$ConnStr:=$ConnStr+"Pwd=Password"
C_LONGINT($ConnID;$SelID)
$ConnID:=DBGateway_Connect ("10.123.123.123";$ConnStr)