Connection DB with Statement
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,5 @@
|
|||||||
package com.example.happy_bird;
|
package com.example.happy_bird;
|
||||||
|
|
||||||
import java.beans.Statement;
|
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
public class MariaDB
|
public class MariaDB
|
||||||
{
|
{
|
||||||
@@ -21,6 +20,7 @@ public class MariaDB
|
|||||||
try {
|
try {
|
||||||
Class.forName(driver);
|
Class.forName(driver);
|
||||||
con=DriverManager.getConnection(url, username, pw);
|
con=DriverManager.getConnection(url, username, pw);
|
||||||
|
st=con.createStatement();
|
||||||
System.out.println("Connection is successful");
|
System.out.println("Connection is successful");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Fehler in der Verbindung");
|
System.out.println("Fehler in der Verbindung");
|
||||||
|
Reference in New Issue
Block a user