Subject | Re: [Firebird-Java] Re: How to read the content of the trigger!!! |
---|---|
Author | Roman Rokytskyy |
Post date | 2005-05-24T06:44:05Z |
> But field RDB$TRIGGER_SOURCE is Blod.I haven't tried your code yet.IsYou can do the following:
> it Ok or I have to convert it into Java String to display and
> modify.How can I do that?
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(BLOB_SOURCE_SELECT);
if (!rs.next())
throw new SomeException("Could not load source for BLOB");
return new String(rs.getBytes(1));
Alternatively you can supply encoding into String(...) constructor, but that
is not needed, since the source contains only ASCII characters anyway.
Roman