db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: [jira] Commented: (DERBY-85) NPE when creating a trigger on a table and default schema doesn't exist.
Date Fri, 10 Feb 2006 10:41:28 GMT
Dyre.Tjeldvoll@Sun.COM writes:

>>>>>> "KAH" == Knut Anders Hatlen <Knut.Hatlen@Sun.COM> writes:
>     KAH> So you have never typed help in ij? ;)
>
> No I haven't.
>
>     ij> connect 'jdbc:derby:/tmp/mydb';
>     ij> show connections;
>     KAH> CONNECTION0* - 	jdbc:derby:/tmp/mydb
>     KAH> * = current connection
>     ij> connect 'jdbc:derby:/tmp/mydb';
>     KAH> ij(CONNECTION1)> show connections;
>     KAH> CONNECTION0 - 	jdbc:derby:/tmp/mydb
>     KAH> CONNECTION1* - 	jdbc:derby:/tmp/mydb
>     KAH> * = current connection
>     KAH> ij(CONNECTION1)> set connection connection0;
>     KAH> ij(CONNECTION0)> set connection connection1;
>     KAH> ij(CONNECTION1)> 
>
> Great, thanks, Knut-Anders! 
>
> But I still don't see how this can be used inside a test script,
> though. In the test scripts I have seen, the connection has already
> been established by the test harness. I suppose I could open a
> connection to a hard-coded URL inside the script, but how do you make
> that work with different frameworks? Is the connection URL available
> as some kind of variable or property that can be accessed in the ij-script?

See jdbcapi/users.sql for an example. It seems like you can skip
"jdbc:derby:" from the connection url.

connect 'wombat;shutdown=true;user=francois;password=paceesalute';
connect 'myDB;create=true;user=dan;password=MakeItFaster';

-- 
Knut Anders


Mime
View raw message