Subject Re: [Firebird-Java] Firebird with Jaybird
Author Gustavo Ruiz
hello everybody, as I connect to firebird with jdbc or
datasource with a user who has a role, since to
connect itself with a role in firebird it is necessary
to specify it when one is connected.
ej:connect test.fdb user test password secret role
read

thanks.




--- "LEANDRO (YAHOO)" <leandro_vcs@...>
escribi├│:
> to conect...
>
> public class AristarcusDatabase extends Database
> {
> final static String jdbcDriver =
> "org.firebirdsql.jdbc.FBDriver";
> final static String jdbcProtocolPrefix =
> "jdbc:firebirdsql://";
> final static String dbName =
> "localhost/C:/OP2/OP7/Aristarcus.GDB";
>
> public AristarcusDatabase(String user, String
> passwd)
> throws PersistenceException
> {
> super(jdbcDriver, jdbcProtocolPrefix + dbName,
> "SYSDBA", "masterkey");
> registerPersister(Author.class, new
> AuthorPersister());
> registerPersister(Paper.class, new
> PaperPersister());
> //registre os demais persisters
> }
>
> to insert...
>
> synchronized public void insert(Transaction t,
> Persistent p)
> throws PersistenceException
> {
> try
> {
> Database db =
> (Database)t.getObjectStore();
> Author author = (Author)p;
>
> String sqlQuery = ("INSERT INTO
> AUTHOR("+
> "AuthorId, PersistentId, Formation, Name,
> Email, RG, CPF)" +
> " VALUES (" + author.getId() + "," +
> author.getId() + ",'" +
> author.getFormation() + "','" +
> author.getName() + "','" +
> author.getEmail() + "','" +
> author.getRG() + "','" +
> author.getCPF() + "')");
>
> db.executeQuery(sqlQuery);
>
> thanks...
>
> LEANDRO
>
> > > I try to use Firebird and JDBC Jaybird to access
> a GDB file, but
> > > when I try to insert a data in GDB I give a
> message:
> > >
> > > Resource Exception. Unrecognized transaction
> > > Reason: Unrecognized transaction
> > >
> > > How can I resolv this??
> >
> > Should not happen in normal case. Please post the
> code you use and the
> full
> > stack trace.
> >
> > Roman
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Make a clean sweep of pop-up ads. Yahoo! Companion
> Toolbar.
> Now with Pop-Up Blocker. Get it for free!
>
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
>
--------------------------------------------------------------------~->
>
>
>
> Yahoo! Groups Links
>
>
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
>

=====
_______________________________________
Ruiz Santicchio Gustavo Javier
CUCAIBA - Sector C├│mputos
Tel: (0221)427-6070 int 214
La Plata - Argentina





___________________________________________________________
100mb gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar