HOW TO
Steps to bypass the login screen when making an SQL connection to an Oracle database on UNIX and PC platforms.
Code:
theSQL=SQLCon.Find("Oracle")
theSQL.Login("user/password")
astring="Select * from house1"
theVTab=VTab.MakeSQL(theSQL, astring)
myTable=Table.Make(theVtab) av.GetProject.AddDoc(mytable)
mytable.GetWin.Open
Note:
This script assumes that the environment variables needed to connect to Oracle have been set.
Code:
theCon = SQLCon.Find("DSN NAME")
theCon.Login("SRVR=orasan;UID=snoopy;PWD=snoopy")
astring="Select * from house1"
theVTab=VTab.MakeSQL(theCon, astring)
myTable=Table.Make(theVtab)
av.GetProject.AddDoc(mytable)
mytable.GetWin.Open
san = (DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = sanawar)
(PORT = 1521)
)
(CONNECT_DATA =
(SID = oracle7)
)
)
rexx = (DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = rexx)
(PORT = 1521)
)
(CONNECT_DATA =
(SID = sde30)
)
)
Article ID:000004029
Get help from ArcGIS experts
Download the Esri Support App