gajmp
asked on
How to connect the Oracle Database Manually thro PB application
I want to connect the Oracle DB manually through my Powerbuillder application. That is Whenever user run my application DB should start automatically. If they close my application then the DB should shutdown automatically.
Now I have wrote batch file to connect the Oracle DB run the batch file in the Open event of my application to start the DB. Run the batch file in close event of my application to shutdown the DB by calling the Run() function.
1. But it showing the command prompt window. I dont want to show the comand prompt window.
2. Once the TNSListener service started then the application started. but I dont want this. Actually I want once all the other services (like Oracle Agent etc..) started then only my application should start.
Please help me to solve this problem
Now I have wrote batch file to connect the Oracle DB run the batch file in the Open event of my application to start the DB. Run the batch file in close event of my application to shutdown the DB by calling the Run() function.
1. But it showing the command prompt window. I dont want to show the comand prompt window.
2. Once the TNSListener service started then the application started. but I dont want this. Actually I want once all the other services (like Oracle Agent etc..) started then only my application should start.
Please help me to solve this problem
The application open event code should look like below,
// Profile EAS Demo DB V3
SQLCA.DBMS = "ODBC"
SQLCA.Database = "EAS Demo DB V3"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB V3;UID=dba;PWD=sql'"
Connect Using SQLCA; //This line is important to connect to ur database
open(w_customer)
// Profile EAS Demo DB V3
SQLCA.DBMS = "ODBC"
SQLCA.Database = "EAS Demo DB V3"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB V3;UID=dba;PWD=sql'"
Connect Using SQLCA; //This line is important to connect to ur database
open(w_customer)
ASKER
Sorry...one mistake in my Question. I want to start my DB first and then only will connect. My requirement is want to start and shutdown the DB automatically without any user intervene.
regarding connection I already complete those steps.. My application should start and shutdown the DB automatically
regarding connection I already complete those steps.. My application should start and shutdown the DB automatically
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
2> Then open your pb database profile there create a new profile under ODBC and set ur ODBC profile name. Aftre that just test your connection.