Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
35d70e9c
Commit
35d70e9c
authored
Apr 15, 1999
by
Peter Mount
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced <literal></literal> with "" in ProgramListing sections
parent
0c0151a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
doc/src/sgml/jdbc.sgml
doc/src/sgml/jdbc.sgml
+8
-8
No files found.
doc/src/sgml/jdbc.sgml
View file @
35d70e9c
...
...
@@ -163,7 +163,7 @@ In the first method, your code implicitly loads the driver using the
Class.forName() method. For <application>Postgres</application>, you would use:
<programlisting>
Class.forName(
<literal>postgresql.Driver</literal>
);
Class.forName(
"postgresql.Driver"
);
</programlisting>
This will load the driver, and while loading, the driver will automatically
...
...
@@ -380,9 +380,9 @@ An example is as follows:
<programlisting>
Statement st = db.createStatement();
ResultSet rs = st.executeQuery(
<literal>select * from mytable</literal>
);
ResultSet rs = st.executeQuery(
"select * from mytable"
);
while(rs.next()) {
System.out.print(
<literal>Column 1 returned </literal>
);
System.out.print(
"Column 1 returned "
);
System.out.println(rs.getString(1));
}
rs.close();
...
...
@@ -400,7 +400,7 @@ To perform an update (or any other SQL statement that does not return a
result), you simply use the executeUpdate() method:
<programlisting>
st.executeUpdate(
<literal>create table basic (a int2, b int2)</literal>
);
st.executeUpdate(
"create table basic (a int2, b int2)"
);
</programlisting>
</para>
</sect1>
...
...
@@ -455,9 +455,9 @@ create table images (imgname name,imgoid oid);
To insert an image, you would use:
<programlisting>
File file = new File(
<literal>myimage.gif</literal>
);
File file = new File(
"myimage.gif"
);
FileInputStream fis = new FileInputStream(file);
PreparedStatement ps = conn.prepareStatement(
<literal>insert into images values (?,?)</literal>
);
PreparedStatement ps = conn.prepareStatement(
"insert into images values (?,?)"
);
ps.setString(1,file.getName());
ps.setBinaryStream(2,fis,file.length());
ps.executeUpdate();
...
...
@@ -477,8 +477,8 @@ Retrieving an image is even easier (I'm using PreparedStatement here, but
Statement can equally be used):
<programlisting>
PreparedStatement ps = con.prepareStatement(
<literal>select oid from images where name=?</literal>
);
ps.setString(1,
<literal>myimage.gif</literal>
);
PreparedStatement ps = con.prepareStatement(
"select oid from images where name=?"
);
ps.setString(1,
"myimage.gif"
);
ResultSet rs = ps.executeQuery();
if(rs!=null) {
while(rs.next()) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment