Solved

How to create table and test in oracle while installation

Posted on 2004-09-03
3
176 Views
Last Modified: 2011-09-20
i have created one project in vb6 with oracle 8i 1.1.7 as backend. i want to create my database tables while i am installing my software. Can i do it with Software Package and Deployment or i have to follow any procedure. i also want to create the DSN while installation. can i check that my dsn is created or not also can i check that my tables are created or not. Can any body plz help me.
0
Comment
Question by:bnsrinivas
3 Comments
 
LVL 21

Accepted Solution

by:
MogalManic earned 110 total points
Comment Utility
You should be able to execute the CREATE TABLE commands just like you would execute an INSERT or UPDATE statement.  I don't think you can create the actual database, so you will have to be supplied the username/password and TNS name.  Are you using ODBC?  If so, you can use the file DSN mode and create the ODBC connection (I'm not sure how that works though).

As for checking to see if the tables are already created, you can query the ALL_TABLES and/or USER_TABLES views (ALL_TABLES requires special access for your Oracle user account).  Just issue the following query:
  SELECT owner, table_name FROM user_tables WHERE table_name in (...Required table list...)
and parse the results.

You could also check for existince and access on a table by table way.  This solution would be more portable because it would work for any database:
   SELECT * FROM tablename WHERE 1=0
This statement would throw an oracle error if the table did not exist and/or the user account did not have SELECT access to the table.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array6 challenfge 6 62
creating threads in delphi 1 52
Convert MSI to MSM 1 24
Replace Ubuntu Desktop with Ubuntu Server 7 42
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

772 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

10 Experts available now in Live!

Get 1:1 Help Now