Solved

How to connect the Oracle Database Manually thro PB application

Posted on 2009-07-01
4
512 Views
Last Modified: 2013-12-26
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
0
Comment
Question by:gajmp
4 Comments
 

Expert Comment

by:Treety_Patnaik
ID: 24760502
1> Create a ODBC for ur oracle database.
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.
0
 
LVL 14

Expert Comment

by:shru_0409
ID: 24760862
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)
0
 
LVL 3

Author Comment

by:gajmp
ID: 24761149
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
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 500 total points
ID: 24778050
Use Run and Wait utility from this link. Very nice userobject with windows api.

http://www.topwizprogramming.com/freecode_runandwait.html

you can run any exe or bat file in silent mode and can wait until execution of it completes.

Let me know if you couldn't figure out how to use it.

Regards,
Sandeep
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
dangers of teaching programming 10 133
Eclipse and java version isssue 2 48
Eclipse MARs unable to start with exit code=13 2 81
eclipse compiler vs Installed JREs option 3 105
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question