First of all, posting the same question several times is annoying. Try
not to do that.

It looks like the first thing you tried should have worked. Are you
using the right Driver? My sql tasks use the Oracle driver that is in
ojdbc14.jar. Also, try putting the jar file in $ANT_HOME/lib rather than
using the <classpath> stuff.

-Rob A

> -----Original Message-----
> From: Harshal Chavda [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 17, 2006 9:25 AM
> To: user@ant.apache.org
> Subject: sql task
> 
>   
> 
> Hello to all users
> My configuration is
> --pentium 4,CPU  3GHz,512 MB RAM,windows XP professional 
> --JDK 1.5,Ant 1.6.3,Tomcat 4.1,Cruisecontrol 2.2.1
> 
> 
> I ahve a problem regarding the sql task. I use the following 
> code to which I get The following error:
> 
>       <target name="sqltesting">
>       <sql 
>       driver="oracle.jdbc.driver.OracleDriver"        
>       url="jdbc:oracle:thin:@localhost:harshal"
>       userid="scott"  password="tiger" >
> 
>       insert
>     into table trainees
>     values(naam,pataa);
> 
>       <classpath>
>       <pathelement 
> location="G:\BE_Project\Ant\RG\RG\lib\classes12.jar"/>
>        </classpath>
>        </sql>
> --------------------------------------------------------------
> -------------------------------------------------------------
> ERROR
> BUILD FAILED
> G:\BE_Project\Ant\RG\RG\Practice\prac.xml:48: 
> java.sql.SQLException: Io exception: Invalid 
> 
> connection string format, a valid format is: "host:port:sid"
> --------------------------------------------------------------
> -------------------------------------------------------------
> --------------------------------------------------------------
> -------------------------------------------------------------
> Line 48 is --------->         userid="scott"  password="tiger" >
> --------------------------------------------------------------
> -------------------------------------------------------------
> --------------------------------------------------------------
> -------------------------------------------------------------
> 
> Assuming the above code to be the original one I made the 
> following changes
> All the changes are relative to the original code given 
> above:::::::::::
> 
> CHANGE 
> 1-------------------------------------------------------------
> ----------------------------------------------
> 
>       url="localhost:1521:harshal"
> ERROR
> -------------
> -------------
> 
> BUILD FAILED
> G:\BE_Project\Ant\RG\RG\Practice\prac.xml:48: 
> java.sql.SQLException: No suitable
>  Driver for localhost:1521:harshal
> 
> 
> 
> CHANGE 
> 2-------------------------------------------------------------
> ----------------------------------------------
> 
>      url    =" jdbc:oracle:thin:@localhosthost:1521:harshal"
>     
> 
> 
> ERROR
> ---------------
> ---------------
> BUILD FAILED
> G:\BE_Project\Ant\RG\RG\Practice\prac.xml:48: 
> java.sql.SQLException: Io exception: The Network 
> 
> Adapter could not establish the connection
> 
> 
> 
> How can I get around this problem?
> 
> Thanks Harshal
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to