From: | Peter T Mount <postgresdev(at)maidast(dot)demon(dot)co(dot)uk> |
---|---|
To: | Patrick Scott Pierce <pspierce(at)slacker(dot)design(dot)mindspring(dot)net> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC |
Date: | 1998-03-27 17:46:53 |
Message-ID: | Pine.LNX.3.95.980327174053.2035A-100000@maidast |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Wed, 25 Mar 1998, Patrick Scott Pierce wrote:
> Peter,
>
> In case anyone ask:
>
> Here is what I did to ResultSet.java to get the proper Timestamp:
> public Timestamp getTimestamp(int columnIndex) throws SQLException
> {
> SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzz");
> df.setTimeZone(TimeZone.getDefault());
> String s = getString(columnIndex);
> if (s != null)
> {
> try {
> java.util.Date d = df.parse(s);
> return new Timestamp(d.getTime());
> } catch (ParseException e) {
> throw new SQLException("Bad Timestamp Format: at " +
> e.getErrorOffset() + "
> in " + s);
> }
> }
> return null; // SQL NULL
> }
>
> It allows me to update Timestamp on jbuilder. I don't know what the
> ramifications are elsewhere.
I'm working on the driver this weekend, so I'll test it out then.
> I never did look into the authorization wierdness. Frankly, it works and
> I don't have time to figure out why ;) I did some stuff to getDate to get
> it to work for me as well if anyone has a problem. I don't know how much
> of this would effect people not using jbuilder so it may be a moot point.
I'll be interested in seeing any changes that you made to get you working.
--
Peter T Mount petermount(at)earthling(dot)net or pmount(at)maidast(dot)demon(dot)co(dot)uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter(at)maidstone(dot)gov(dot)uk
From | Date | Subject | |
---|---|---|---|
Next Message | Constantin Teodorescu | 1998-03-28 07:37:58 | Re: pgaccess difficulties on pg6.3 |
Previous Message | lad | 1998-03-27 12:48:06 |