SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

JDBC / NOTES</>↗
JDBC22 Mar 2026

How do I use DatabaseMetaData to inspect schema in JDBC?

You use java.sql.DatabaseMetaData by: Opening a Connection Calling conn.getMetaData() Querying catalogs/schemas/tables/columns/keys/indexes via the DatabaseMetaData “getXxx” methods (they mostly return ResultSets) Reading those result sets like normal query results Below are the most common inspection tasks and the JDBC calls that power them. 1) Get the DatabaseMetaData package org.kodejava.jdbc; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.Dr...

Wayan · 5 min read
JDBC / NOTES</>↗
JDBC26 Feb 2026

How do I handle database timeouts in JDBC?

In JDBC, “database timeouts” can mean a few different things, and you handle each at a different layer. The most practical approach is to set timeouts deliberately and then catch the right exception types so you can decide whether to retry, fail fast, or surface a user-friendly error. 1) Connection timeout (can’t connect / handshake […]

Wayan · 5 min read
JDBC / NOTES</>↗
JDBC23 Feb 2026

How to Detect Deadlocks in JDBC?

Deadlocks in JDBC typically refer to database-level deadlocks, where two or more transactions block each other while waiting for locks on resources (e.g., rows or tables). JDBC itself doesn’t “detect” them proactively; instead, the database server signals them via exceptions. Here’s how to handle detection effectively: 1. Catch and Inspect SQLException Wrap your JDBC operations […]

Wayan · 3 min read
JDBC / NOTES</>↗
JDBC23 Feb 2026

How do I use SQLSTATE error codes in JDBC?

SQLState error codes are a standardized way in JDBC to categorize database errors, making it easier to handle exceptions programmatically. They’re part of the SQLException class and follow the SQL:2003 standard (like “23000” for integrity constraints). Unlike vendor-specific error codes (from getErrorCode()), SQLState is more portable across databases. 1. What is SQLState? It’s a 5-character […]

Wayan · 3 min read
JDBC / NOTES</>↗
JDBC19 Feb 2026

How do I handle SQL exceptions in JDBC for MySQL properly?

For MySQL (mysql-connector-j), “proper” SQLException handling is the same core approach as JDBC in general, plus a few MySQL-specific signals (SQLState + error code) that are worth using for translation/retry decisions. 1) Keep the important diagnostics (MySQL error code + SQLState) MySQL gives you two invaluable fields: e.getErrorCode() → MySQL vendor error code (e.g., 1062 […]

Wayan · 4 min read
JDBC / NOTES</>↗
JDBC18 Feb 2026

How do I handle SQL exceptions in JDBC properly?

Handling SQLException “properly” in JDBC is mostly about (1) not leaking resources, (2) preserving diagnostic detail, (3) rolling back safely, and (4) translating errors into something meaningful at your app boundary. 1) Always close JDBC resources (use try-with-resources) This eliminates most error-handling bugs (leaks and double-closes), and it also handles exceptions thrown during close() by […]

Wayan · 4 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.