Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to create table and test in oracle while installation

Posted on 2004-09-03
3
Medium Priority
?
184 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
[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
3 Comments
 
LVL 21

Accepted Solution

by:
MogalManic earned 440 total points
ID: 11971201
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

Industry Leaders: 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

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Progress

722 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