Difference between JDBC Driver type numbers

后端 未结 5 2097
一整个雨季
一整个雨季 2020-12-14 08:50

I noticed that JDBC has different Drivers like:

  1. Type 1 Driver
  2. Type 2 Driver etc.. to Type 4

Why did they get the name like Type 1, Typ

5条回答
  •  心在旅途
    2020-12-14 09:18

    The numbers aren't very informative. I find it more useful to think of it along the lines of:

    • Local API (1,2) vs network protocol (3, 4)
    • Database-independent (odd numbers) vs database-specific (even numbers)

    I could never remember the numbers, but when someone said "we use a type-4 driver here", I could ask two yes-no questions to know what they were talking about.

提交回复
热议问题