Solved

How to connect the Oracle Database Manually thro PB application

Posted on 2009-07-01
4
514 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

726 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