ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <prit...@sqatester.com>
Subject RE: how to create database
Date Mon, 31 Mar 2003 11:56:52 GMT
Thanks Rajat,
              for your support but iam faling to understand where you are creating Database
,like in mysql you first of all create database by writing this statment "create database
ABC" and after that you start creating tables in that database and then start populating tables
by using insert statment.
pls throw some light on my confusion and also if i had missed something in your code
thanx
pritesh

--- "Rajat Gupta" <Rajat.Gupta@oracle.com> wrote:
>Hi Pritesh,
>What I did in my sample located at
>http://otn.oracle.com/sample_code/tech/xml/survey/content.html was to use
>the 'exec' task as follows :
>
>  <target name="InstallDataBase">
>     <exec executable="sqlplus"  os="Windows NT, Windows 95"
>resultproperty="database.install" failonerror="true"
>failifexecutionfails="true">
>       <arg line="System/${db.system.pwd}@${db.tnsname}
>@${sample.home}\sql\AutoInstall.sql ${db.tnsname}"/>
>     </exec>
>
>     <exec executable="sqlplus"  os="SunOS, Linux, Solaris, HP-UX"
>resultproperty="database.install" failonerror="true"
>failifexecutionfails="true">
>       <arg line="System/${db.system.pwd}@${db.tnsname}
>@${sample.home}/sql/AutoInstall.sql ${db.tnsname}"/>
>     </exec>
>  </target>
>
>Hope this helps,
>Thanks,
>Rajat
>
>-----Original Message-----
>From: Pritesh saharey [mailto:pritesh@sqatester.com]
>Sent: Monday, March 31, 2003 11:32 AM
>To: Apache mailing list
>Subject: how to create database
>
>
>Hi all,
>     I would like to know how can i create a databse using sql task as like
>to create database as well its tables ,iam able to create tables for my data
>base but was unable to create database
>as sql tage allows insert statments but not create statments,like this
><sql
>    driver="org.database.jdbcDriver"
>    url="jdbc:database-url"
>    userid="sa"
>    password="pass"
>    src="data.sql"
>    rdbms="oracle"
>    version="8.1."
>    >
>insert
>into table some_table
>values(1,2,3,4);
>
>truncate table some_other_table;
></sql>
>Now if i want to create database like "Create Database ABC" and then want to
>run my .sql script of create tables how can i do that.
>pls can anybody help me out
>pritesh
>
>
>
>_____________________________________________________________
>Join SQAtester.com Community  --->
>http://www.sqatester.com/testersarea/joinus.htm
>
>_____________________________________________________________
>Select your own custom email address for FREE! Get you@yourchoice.com w/No
>Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

_____________________________________________________________
Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP &
more! http://www.everyone.net/selectmail?campaign=tag

Mime
View raw message