Accessing Progress databases in JAMS

Follow

Users can access a Progress database in JAMS by using the PowerShell Execution Method.

NOTE: If using a 32 bit DSN, users should select the PowerShell32 Execution Method.

 

The script below is an example of how PowerShell can be used to connect to a System DSN. This script can be customized to the user environment in order to access Progress databases.


#Include only the Connection string parameters you want to override from the system DSN settings
$connectstring = "DataSourceName=myDSN;HostName=myServerAddress;Database=myDataBase;LogonID=myUsername;Password=myPassword;PortNumber=2055;"
$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)
#Define the query
$sql = "select * from TableName"
#Open the connection
$conn.open()
$cmd = New-Object system.Data.Odbc.OdbcCommand($sql,$conn)
$data = New-Object system.Data.Odbc.OdbcDataAdapter($cmd)
$Results = New-Object system.Data.datatable
$null = $data.fill($Results)
#Close the connection
$conn.close()
#Return the results
$Results

 

 

 

Have more questions? Submit a request

Comments