PowerBuilder Connect Oracle
Step 1: Get driver Oracle Instant Client from page : https://www.oracle.com/database/technologies/instant-client/downloads.html
Step 2: Set Oracle Instant Client Path to environment variables ORACLE_HOME, NLS_LANG, TNS_ADMIN
https://docs.oracle.com/en… or https://docs.oracle.com/cd…
Step 3: Test Connect
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
String ls_database, ls_servername, ls_port, ls_user, ls_pass boolean lb_host ls_user = "user" ls_pass = "passwords" ls_database = "database" ls_servername = "servername.com" ls_port = "port" If lb_host Then ls_servername = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = " + ls_servername + ")(PORT = " + ls_port + "))) (CONNECT_DATA = (SID = " + ls_database + ")) )" End If // Using ODBC Connect To Oracle Transaction ltran_conn ltran_conn = Create Transaction ltran_conn.DBMS = "O10 Oracle10g (10.1.0)" ltran_conn.LogPass = ls_user ltran_conn.ServerName = ls_servername ltran_conn.LogId = ls_pass ltran_conn.AutoCommit = False ltran_conn.DBParm = "CommitOnDisconnect='No'" Connect Using ltran_conn ; If ltran_conn.SQLCode = -1 Then MessageBox('Warning','Connect Database Error' + ltran_conn.SQLErrText) Else MessageBox('Warning',"Connect Success!") End If Disconnect Using ltran_conn ; |
Find Projects On Github click here
Good Luck!
Subscribe
Login
0 Comments