Freigeben über


DriverManager.GetDriver(String) Method

Definition

Attempts to locate a driver that understands the given URL.

[Android.Runtime.Register("getDriver", "(Ljava/lang/String;)Ljava/sql/Driver;", "")]
public static Java.Sql.IDriver? GetDriver (string? url);
[<Android.Runtime.Register("getDriver", "(Ljava/lang/String;)Ljava/sql/Driver;", "")>]
static member GetDriver : string -> Java.Sql.IDriver

Parameters

url
String

a database URL of the form jdbc:<em>subprotocol</em>:<em>subname</em>

Returns

a Driver object representing a driver that can connect to the given URL

Attributes

Exceptions

if there is any kind of problem accessing the database.

Remarks

Attempts to locate a driver that understands the given URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.

Java documentation for java.sql.DriverManager.getDriver(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to