Solved

How to connect the Oracle Database Manually thro PB application

Posted on 2009-07-01
4
509 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
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 and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

914 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now