Help with a College VB project

Hey guys I need some help with my college VB project. We created a software in VB that used Oracle SQL. We are done with evreything now but I want to make the project as an installable file like other exe's. Of course I make that using the 'Make .exe' feature and the package and deployment tool of VB. But problem is how do I add the tables and the data to other PC? I don't to manually create a new database there and add our tables and data later in that everytime I install it on new machine.

Is there any way that I can just pack the whole stuff in one set/exe file which will install all the VB files as well as database and whole other stuff?

Looking forward to you guys :)

Of course I tried Google but I didn't find much exactly what I wanted and whatever I found went all over my head :p Please help me in a noobish manner :)

Thanks in advance to all
 
godsp33d said:
Use something light ,like mySQL or MS SQL Server Express.

Make ur exe install the database and run the DDL/DML scripts.

Actually we are allowed to use only Oracle SQL and no other database. That too Oracle 8i only! :mad:

Can you please give me some tips for that?
 
Create a file containing all DDL statements. Use the installer to launch SQL Plus and execute the file.

The target systems will need an installation of Oracle d/b as well.

// rant

Why 8i ? Why aren't you allowed to use newer version ? Use of Oracle without license - isn't legal. Atleast you guys can use 10XE. And *really* can anyone find out which version you guys are using?

//end rant

Just my $0.02
 
coolpcguy said:
Create a file containing all DDL statements. Use the installer to launch SQL Plus and execute the file.
The target systems will need an installation of Oracle d/b as well.
// rant
Why 8i ? Why aren't you allowed to use newer version ? Use of Oracle without license - isn't legal. Atleast you guys can use 10XE. And *really* can anyone find out which version you guys are using?

//end rant
Just my $0.02

Well we are COMPLETELY new to oracle and didn't know this. We thought they might know which version we were using :huh:

blackprince said:
i am not sure about 8i

9i has option to export tables and import it on another installation
ie you dont need to run sepp DDL and DML commands

We are looking for something which an average user too can do. Something like clicking on an exe and it will create everything :p
Anyways thanks to both of you for the tips. Please keep it coming.
 
amol_cool said:
Hey guys I need some help with my college VB project. We created a software in VB that used Oracle SQL. We are done with evreything now but I want to make the project as an installable file like other exe's. Of course I make that using the 'Make .exe' feature and the package and deployment tool of VB. But problem is how do I add the tables and the data to other PC? I don't to manually create a new database there and add our tables and data later in that everytime I install it on new machine.

Is there any way that I can just pack the whole stuff in one set/exe file which will install all the VB files as well as database and whole other stuff?

Looking forward to you guys :)

Of course I tried Google but I didn't find much exactly what I wanted and whatever I found went all over my head :p Please help me in a noobish manner :)

Thanks in advance to all

There is a workaround, not the most effective if you dont want to mess up with the exe setup. After the installation, and at the run of your VB application, on the splash screen, do a ping to the database. See if the required database exists. If it does not, then prompt the user and create the database (Your code will have to contain all the creation statements in perfect order - database, tables, procedures, triggers etc.).
Down side, the ping to the database happens each time you load the software. Not the most effective, but well will serve the purpose short term for a normal college project at the very least.

Do let us know if it does help or if you want me to expand more on the idea.
 
XTerminator said:
There is a workaround, not the most effective if you dont want to mess up with the exe setup. After the installation, and at the run of your VB application, on the splash screen, do a ping to the database. See if the required database exists. If it does not, then prompt the user and create the database (Your code will have to contain all the creation statements in perfect order - database, tables, procedures, triggers etc.).
Down side, the ping to the database happens each time you load the software. Not the most effective, but well will serve the purpose short term for a normal college project at the very least.

Do let us know if it does help or if you want me to expand more on the idea.

now i rem, similar thing happens in product i work
its in C++..
creates DB tables if its not there,
i will check the code...
 
blackprince said:
now i rem, similar thing happens in product i work
its in C++..
creates DB tables if its not there,
i will check the code...

Hmm, coding what I suggested isnt too difficult. If he managed to create the project himself, this should be a breeze. A new outlook to the same will be knowledgeable for everyone though.
 
Well we are COMPLETELY new to oracle and didn't know this. We thought they might know which version we were using

The only way to know the Oracle version is

1. Logon to SQL*Plus where it will show the Oracle version.

2. Query v$ version

Code:
SQL> SELECT * FROM V$VERSION

  2  /

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

PL/SQL Release 10.2.0.1.0 - Production

CORE    10.2.0.1.0      Production

TNS for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

This is a good way

Xterminator said:
After the installation, and at the run of your VB application, on the splash screen, do a ping to the database. See if the required database exists. If it does not, then prompt the user and create the database (Your code will have to contain all the creation statements in perfect order - database, tables, procedures, triggers etc.).

Other wise make use of a flag or file to indicate a status if its first run, and if so deploy the schema.

To deploy the schema you can

(a) As mentioned create a script containing all DDL statements

(b) Export your schema & import them into the environment where you want to setup. Be sure to have a datapurge script to clear off all of *your* data, if you are going ahead.

I had written a blog post long ago - on exporting/importing using Oracle's exp/imp tools, link to it

Do read it, as I've mentioned a very easy tool for the same.

ED: Btw to obtain the DDL statement, use Oracle SQL Developer. Even for normal ad-hoc queries you ought to use it, its fantastic.
 
XTerminator said:
There is a workaround, not the most effective if you dont want to mess up with the exe setup. After the installation, and at the run of your VB application, on the splash screen, do a ping to the database. See if the required database exists. If it does not, then prompt the user and create the database (Your code will have to contain all the creation statements in perfect order - database, tables, procedures, triggers etc.).
Down side, the ping to the database happens each time you load the software. Not the most effective, but well will serve the purpose short term for a normal college project at the very least.

Do let us know if it does help or if you want me to expand more on the idea.

Wow now that's a great tip. :clap:

coolpcguy said:
The only way to know the Oracle version is
1. Logon to SQL*Plus where it will show the Oracle version.
2. Query v$ version
Code:
SQL> SELECT * FROM V$VERSION
  2  /

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

This is a good way

Other wise make use of a flag or file to indicate a status if its first run, and if so deploy the schema.

To deploy the schema you can
(a) As mentioned create a script containing all DDL statements
(b) Export your schema & import them into the environment where you want to setup. Be sure to have a datapurge script to clear off all of *your* data, if you are going ahead.
I had written a blog post long ago - on exporting/importing using Oracle's exp/imp tools, link to it
Do read it, as I've mentioned a very easy tool for the same.

Yes, XT's tip and your idea of flag will surely help me a lot to what I wanted to achieve.

I was wondering, just like we use the exp/imp in our Command prompt to export or import the d/b, can they be used in this case too?

Like say, create a .bat file containing all the instructions to export or import a d/b and then run that .bat file with the set up of the project created by package tool of VB. It would create the tables as well as populate all the data into them at the time of installation itself. But I am not sure whether it will work or not or I am in the right direction at least :huh:

Can anyone shade some light on this please?
 
exp/imp tools are meant to be run from command prompt. Fully automating these will be a bit tricky, since you'll need to grant roles for the new users. Wrapping them in a batch file is a nice way, but you will jhave to do couple of dry runs before you try it out for sure.

In other words, you are in the right track :)
 
coolpcguy said:
exp/imp tools are meant to be run from command prompt. Fully automating these will be a bit tricky, since you'll need to grant roles for the new users. Wrapping them in a batch file is a nice way, but you will jhave to do couple of dry runs before you try it out for sure.
In other words, you are in the right track :)

Ok so now I am stuck again.

I am creating a .bat file that will create a back up of database (of SQL) upon being executed. One way to do this is by using the command prompt and using the 'exp' command followed by username and password and blah blah.

Now I want to automate THIS process. But I am stuck where it asks for enter. How do I pass enter to command prompt through a bat file?

I want pass these commands to the command prompt.

-------------------------
exp
SQL username
SQL password
[enter]
Location file to the saved
2
[enter]
[enter]
no

--------------------------

Can anyone please help me how do I pass this through a bat file to command prompt?
 
^ Did you *not* read my blog post ?

PHP:
exp user/password@hoststring file=filename.dmp log=filename.log
PHP:
imp username/password@hoststring file=filename.dmp log=filename.log full=y
 
coolpcguy said:
^ Did you *not* read my blog post ?

PHP:
exp user/password@hoststring file=filename.dmp log=filename.log
PHP:
imp username/password@hoststring file=filename.dmp log=filename.log full=y

WOW

1. That;s for the lightning speed reply
2. Sorry I missed your post. Reading it now. Hopefully it will solve all my problems :)
3. Thanks again :D
 
Back
Top