JDBC problem in the docs

Started by Peter T Mountover 26 years ago2 messages
#1Peter T Mount
peter@retep.org.uk

I'm being asked the same question every so often, about the following
line:

Class.forName(postgresql.Driver);

People are asking why this isn't working. Obviously there should be quotes
in there, and I'm thinking that they are missing from the docs.

Class.forName("postgresql.Driver");

I haven't the time to check at the moment, but can someone (Tom?) check.
They may have vanished when we converted them to sgml

Peter

--
Peter T Mount peter@retep.org.uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf

#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Peter T Mount (#1)
Re: [HACKERS] JDBC problem in the docs

I'm being asked the same question every so often, about the following
line:
Class.forName(postgresql.Driver);
People are asking why this isn't working. Obviously there should be quotes
in there, and I'm thinking that they are missing from the docs.
Class.forName("postgresql.Driver");

golem> grep -i Class.forName *.sgml
jdbc.sgml:Class.forName() method. For
<application>Postgres</application>, you would use:
jdbc.sgml:Class.forName("postgresql.Driver");

And from the generated html:

<snip>
In the first method, your code implicitly loads the driver using the
Class.forName() method. For Postgres, you would use:

Class.forName("postgresql.Driver");
</snip>

Not sure if it could be mentioned somewhere else? Or maybe we can make
a general statement about how well people using Java follow directions
:)

- Thomas

--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California