Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Java Tutorial
Database 359 codes
Home
Java Tutorial
Database
1 A JDBC Program to AccessRead Microsoft Excel
2 A List of JDBC Drivers
3 Add batch SQL command into Statement
4 Adding a New Column Name in Database Table
5 Arrange a Column of Database Table
6 Blob and Clob data type
7 Boolean java sql Driver jdbcCompliant()
8 Boolean java sql DriverPropertyInfo required (Is property value required)
9 Call a function with one IN parameter; the function returns a VARCHAR
10 Call a function with one INOUT parameter; the function returns a VARCHAR
11 Call a function with one OUT parameter; the function returns a VARCHAR
12 Call a procedure with one IN parameter
13 Call a procedure with one INOUT parameter
14 Call a procedure with one OUT parameter
15 Call a stored procedure with no parameters and return value
16 Calling a Function in a Database
17 Calling a Stored Procedure in a Database with no parameters
18 Cancel Updates to an Updatable ResultSet
19 Cancelling Updates to an Updatable Result Set
20 Chaining SQLExceptions
21 Change Column Name of a Table
22 Change the fetch size on the result set
23 Check Batch Update count
24 Check BatchUpdateException
25 Check Data Truncation
26 Check for a SQL Warning Using PreparedStatement
27 Check for a warning using a Connection object
28 Check if cursor is in the first row
29 Check ResultSet Holdability
30 Checking for a Warning Using a ResultSet Object
31 Checking for a Warning Using a Statement Object
32 Commit or rollback transaction in JDBC
33 Committing and Rolling Back Updates to a Database
34 Connect to a database and read from table
35 Connect to Access Database using JDBC-ODBC bridge
36 Connect to database and call stored procedure
37 Connect to Derby database
38 Connect to Java DB (Derby) with org apache derby jdbc EmbeddedDriver
39 Connect with Oracles JDBC Thin Driver
40 Connection Object
41 Connection Object Requirements
42 Connection Properties
43 Connections Method to Print Native SQL
44 Convert a java sql Timestamp Object to a java util Date Object
45 Convert a ResultSet to XML
46 Convert a String Date Such as 20030110 to a java sql Date Object
47 Convert a Timestamp to Month-Day-Year
48 Convert into java sql Time into java util Calendar
49 Converting a java sql Types integer value into a printable name
50 Converting types
51 Copy data from one table to another in a database
52 Copy One Database Table to Another
53 Count Records using the Prepared Statement
54 Create a connection to MS Access database
55 Create a Database Table Using a Statement
56 Create a function named myfunc which returns a VARCHAR value; the function has no parameter
57 Create a function named myfuncin which returns a VARCHAR value; the function has an IN parameter named x
58 Create a function named myfuncinout that returns a VARCHAR value
59 Create a function named myfuncout which returns a VARCHAR value
60 Create a MySQL Table to Store Java Types (Using Statement Objects)
61 Create a PreparedStatement object with two parameter markers
62 Create a result set
63 Create a sensitive scrollable result set
64 Create a table in database
65 Create a Table Using PreparedStatement
66 Create an insensitive scrollable result set
67 Create an Oracle Table to Store Java Types (Using Statement Objects)
68 Create an Updatable ResultSet
69 Create procedure myprocin with an IN parameter named x
70 Create procedure myprocinout with an INOUT parameter named x; x is an IN parameter and an OUT parameter
71 Create procedure myprocout with an OUT parameter named x
72 Create Statement and set the ResultSet type
73 Creating a Database in MySQL
74 Creating a Database Table called my_table with one column, col_string, which holds strings
75 Creating a MySQL Database Table to store Java Types
76 Creating a MySQL Table to Store Java Types
77 Creating a SQLServer Table to Store Java Types
78 Creating a Stored Procedure or Function in an Oracle Database
79 Creating an OBJECT Type in an Oracle Database
80 Creating an Oracle Table to Store Java Types
81 Creating java sql Date Using GregorianCalendar
82 Creating java sql Date Using java util Calendar
83 Creating java sql Date Using java util Date
84 Creating java sql Date Using the java sql Date valueOf() Method
85 Database Metadata
86 DatabaseMetaData Methods for Database Information
87 DatabaseMetaData Methods for Information on the Databases Contents
88 DatabaseMetaData Methods for Information on the Databases Limitations
89 DatabaseMetaData Methods for Information on the Databases Supported Features
90 Delete a Column from a Database Table
91 Delete a Row from a Database Table Using an Updatable ResultSet
92 Delete All Rows from a Database Table Using a Statement
93 DELETE data in a table
94 Delete record from table
95 Deleting a Database Table called my_table from a database
96 Deleting a Row from a Database Table
97 Deleting a Table from Database
98 Deleting All Rows from a Database Table
99 Deleting Records using the Prepared Statement
100 Demonstrates various methods for moving the cursor in a scrollable ResultSet object
101 Description of Database Table
102 Designated columns table name
103 Detect if a table exists
104 Determine If a Fetched Value Is NULL
105 Determine if a Database Supports Transactions
106 Determine if a Database Supports Updatable ResultSets
107 Determine if a ResultSet is Updatable
108 Determine Whether a SQL Warning Has Occurred
109 Determining If a Database Supports Scrollable Result Sets
110 Determining If a Database Supports Transactions
111 Determining If a Database Supports Updatable Result Sets
112 Disable auto commit mode in JDBC
113 Display Database contents for current connection
114 Display Database Limitation for your connection
115 Display Parameter information stored in the PreparedStatement
116 DriverManager getDrivers()
117 DriverPropertyInfo[] java sql Driver getPropertyInfo(String url, Properties info)
118 Drop a Database Table Using a Statement
119 Drop table from database
120 Enable JDBC logging
121 Exceptions in JDBC
122 Execute Method
123 Exporting a MySQL Table to a Flat File
124 Extracting Information from SQLException
125 Get a Date for a Specific Time Zone
126 Get a Date Label from a java sql Timestamp Object
127 Get a List of all Available Parameters for Creating a JDBC Connection
128 Get a Long Text ColumnField from a Database
129 Get a MySQL Connection from the Driver Manager
130 Get a ResultSet Type
131 Get all table catalogs
132 Get all table schemas
133 Get Binary Data from a Database Table
134 Get column count from ResultSetMetaData
135 Get column names of a table using ResultSetMetaData
136 Get columns precision and scale value
137 Get Data from a ResultSet
138 Get data types supported by database
139 Get Database information from DatabaseMetaData
140 Get database maximum table name length
141 Get date time functions supported by database
142 Get Date value from ResultSet
143 Get int value from ResultSet
144 Get list of stored procedure names
145 Get metadata from jdbc
146 Get numeric functions supported by database
147 Get procedure information from DatabaseMetaData
148 Get ResultSet Concurrency
149 Get string functions supported by database
150 Get system functions supported by database
151 Get Table and View Names from a Database
152 Get table information from DatabaseMetaData
153 Get Table Names from a Database
154 Get the Column Names in a Result Set
155 Get the Current Date as a java util Date Object
156 Get the current position of cursor
157 Get the Current Timestamp as a java sql Time Object
158 Get the Cursor Position in a Scrollable Result Set
159 Get the database-specific type name
160 Get the Details of a SQLException
161 Get the fetch size of a statement
162 Get the java sql Types type to which this database-specific type is mapped
163 Get the max concurrent connection to a database
164 Get the Number of Rows in a Database Table
165 Get the Number of Rows in a Table Using a Scrollable ResultSet
166 Get TIME value from ResultSet
167 Get TIMESTAMP value from ResultSet
168 Get View Names from a Database
169 Getting a Timestamp Object Using java util Date
170 Getting a Timestamp Object Using System currentTimeMillis()
171 Getting and Inserting Binary Data into an Database Table
172 Getting BLOB Data from a Database Table
173 Getting Column Characteristics
174 Getting Column Names from a database table in Java
175 Getting Information about the Driver
176 Getting the Maximum Table Name Length allowed in a Database
177 Getting the Name of a JDBC Type
178 Getting the Number of Rows in a Database Table
179 Getting the Number of Rows in a Table Using a Scrollable Result Set
180 Getting the Stored Procedure Names in a Database
181 How do you Store a Long Text Field in a Database
182 If a table column can have a null value or not
183 If a table column value is auto-increment
184 If database support batch update
185 If database support scrollable result sets
186 If database support transaction
187 If you Do Not Know the Name, Position, and Type of Each Column, how to get value from ResultSet
188 Insert a Row into a Database Table Using a Statement
189 Insert a Row into a Database Table Using an Updatable ResultSet
190 Insert an Image
191 Insert Binary Data into a Database Table Using a Statement
192 Insert Date value
193 Insert Picture
194 Insert TIME value
195 Insert TIMESTAMP value
196 Inserting a Row into a Database Table
197 Inserting a Row into a Database Table Using a Prepared Statement
198 Inserting an OBJECT Value into an Oracle Table
199 Inserting Records using the Prepared Statement
200 Inserting values in MySQL database table
201 Int java sql Driver getMajorVersion()
202 Int java sql Driver getMinorVersion()
203 Java Object Types Mapped to JDBC Types
204 Java sql SQLException Methods
205 Java Types Mapped to JDBC Types
206 JavaDB Drivers
207 JavaDB Tools
208 JavaDB URLs
209 JDBC Annotations
210 JDBC Mysql Connection String
211 JDBC Transaction Isolation Levels
212 JDBC Types Mapped to Java Object Types
213 Keep the Connection Alive for MySQL
214 Limit the Number of Rows Returned from a SQL Query
215 List tables in a database
216 Listing All Available Parameters for Creating a JDBC Connection
217 Listing All Non-SQL92 Keywords Used by a Database
218 Listing Available SQL data Types Used by a Database
219 Listing the Numeric Functions Supported by a Database
220 Listing the String Functions Supported by a Database
221 Listing the System Functions Supported by a Database
222 Listing the Time and Date Functions Supported by a Database
223 Load driver for SQL Server
224 Load JdbcOdbcDriver and create a table
225 Loading a Flat File to a MySQL Table, file is comma-separated
226 Loading a Flat File to a MySQL Table, file is terminated by rn, use this statement
227 Loading a JDBC Driver
228 Logging JDBC Driver Operations
229 Look up DataSource from InitialContext
230 Make a java sql Timestamp Object for a Given Year, Month, Day, Hour
231 Make Unique Column in Database Table
232 Mapping Between Java to JDBC SQL Types
233 Modify data in a table
234 Move cursor backward
235 Move cursor down 5 rows from the current row If this moves cursor beyond the last row, cursor is put after the last row
236 Move cursor to the beginning, before the first row
237 Move cursor to the end, after the last row
238 Move cursor to the first row
239 Move cursor to the last row
240 Move cursor to the second last row with aboslute position
241 Move cursor up 3 rows from the current row If this moves cursor beyond the first row, cursor is put before the first row
242 Move the cursor back and forth with absolute index
243 Move the Cursor in a Scrollable ResultSet
244 Moving the Cursor in a Scrollable Result Set
245 MySQL Connection Properties
246 MySQL Data type to Java Data type Conversion Table
247 MySQL Error code and message
248 New to Java 6 is a lightweight database called Derby
249 ParameterMetaData Methods for Property Information about Query Parameters
250 Passing user and password Parameters as a java util Properties Object to Connection object
251 Ping JavaDB
252 Prepared Statement Set Big Decimal
253 Prepared Statement With Batch Update
254 Print the stack trace for a SQLException to STDERR
255 Print warnings on a Connection to a specified PrintWriter
256 Print warnings on a Connection to STDERR
257 Query a jdbc odbc connection
258 Read BLOBs data from database
259 Read CLOBs data from database
260 Read data from Excel
261 Read data from Excel worksheet
262 Refresh a Row in an Updatable ResultSet
263 Remove Unique Column in Database Table
264 ResultSet
265 ResultSet Concurrency
266 ResultSet Holdability
267 ResultSetMetaData Methods for Information about a Result Sets Columns
268 ResultSetMetaData Methods for Property Information about a Result Sets Columns
269 ResultSets Methods to Access Columns by Index
270 ResultSets Methods to Access Columns by Name
271 Retrieve a rowcount from a ResultSet
272 Retrieve an Image
273 Retrieve auto-generated keys
274 Retrieve Automatically Generated Keys Using a Statement (MySQL)
275 Retrieve type info from the result set
276 Retrieving All Rows from a Database Table
277 Retrieving Tables from a Database
278 Retrieving the Value of a Column Using the Column Name
279 Retrieving the Value of a Column Using the Index Number
280 Returns a java sql Timestamp equal to the current time
281 Rollback a transaction
282 Rollback to savepoint
283 Rows affected when updating data in database table
284 Scrollable ResultSet
285 Select Records Using Prepared Statement
286 Selecting all rows from a table and creates a result set
287 Set byte, short and long data types by using the Prepared Statement
288 Set Date by using the Prepared Statement
289 Set NULL
290 Set string,ingeger,double and float example by using the Prepared Statement
291 Set the fetch size on the statement
292 Set the Number of Rows to Prefetch Using PreparedStatement
293 Set Time by using the Prepared Statement
294 Set Timestamp by using the Prepared Statement
295 Setting the Login Timeout
296 Setting the Number of Rows to Prefetch When Executing a SQL Query
297 Specify a CharSet when connecting to a DBMS
298 Statement Batch Update
299 Store and retrieve an object from a table
300 Store BLOBs data into database
301 Store CLOBs data into database
302 Stored procedure with InputOutput parms and a ResultSet
303 String java sql DriverPropertyInfo description (Get description of property)
304 String java sql DriverPropertyInfo name (Get name of property)
305 String java sql DriverPropertyInfo value (Get current value)
306 String[] java sql DriverPropertyInfo choices (Get possible choices for property; if null, value can be any string)
307 Sum of Column in a Database Table
308 Sun jdbc odbc JdbcOdbcDriver Connection Example
309 Test to See if Your Connection is Alive
310 The CallableStatement
311 The JavaDB Directory Structure
312 The JavaDB Environments
313 The SQL script for creating the Employee Table
314 To stop JavaDB, you can use the following command
315 To test a JDBC driver installation using MySQL
316 To test a JDBC driver installation using Oracle
317 To view run time information for JavaDB, you can use the following command
318 To view the structure of the Employee table
319 Transaction Isolation Level supported
320 Turning On Autocommit Mode
321 Update a Row in a Database Table Using a Statement
322 Update a Row in a Database Table Using an Updatable Result Set
323 Update annotation
324 Updating a Row in a Database Table
325 Updating a Row in a Database Table Using an Updatable Result Set
326 Use Batch Multiple Updates with PreparedStatement
327 Use JDBC Chained Exception
328 Use JDBC ODBC bridge to read from Excel
329 Use JNDI to get database connection or data source
330 Use PreparedStatement setAsciiStream()
331 Use PreparedStatement setBigDecimal()
332 Use PreparedStatement setBinaryStream()
333 Use PreparedStatement setBoolean()
334 Use PreparedStatement setBytes()
335 Use PreparedStatement setCharacterStream()
336 Use PreparedStatement setURL()
337 Use PreparedStatements setByte(), setShort(), setInt(), and setLong()
338 Uses reflection to get all the field names from java sql Types
339 Using a database transaction with JDBC
340 Using a Loop to Set Values
341 Using a Transaction in JDBC with Exception catching
342 Using DriverManager registerDriver()
343 Using DSN-less connection
344 Using SQLWarning
345 Using the ij Tool
346 Using the Prepared Statement Twice
347 Using the sysinfo Tool
348 Vendor URL Formats
349 Viewing and Switching Connections
350 What is a JDBC Driver
351 What is JDBC
352 Working with a Result Set
353 Working with Date, Time, and Timestamp in JDBC
354 Working with ResultSetMetaData
355 Working with Tables
356 Working with the Preparedstatement
357 Write Data to a Microsoft Excel Spreadsheet File
358 You can use the connect command of ij to establish a connection with a database
359 You can use the server tool to start JavaDB in a network client environment