package beyondsoft.bewoklientenapp;

import android.app.Activity;
import android.os.Bundle;
import java.sql.Connection;

import java.sql.*;
import java.sql.DriverManager;
import java.sql.ResultSetMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;



/**
 * Created by bib on 29.04.2016.
 */
public class ServerAnbindung extends Activity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        connect();

    }

    public void connect(){

        String DBip = "192.168.1.115";
        String DBport = "3306";
        String DBname = "1234567890";
        String DBusername = "root";
        String DBpasswd = "root";

        try {


            Connection con = null;

            //Class.forName("com.mysql.jdbc.Driver").newInstance();


            System.out.println("Wenn hier: Das problem liegt nicht an der klasse ");

         //   con = DriverManager.getConnection("jdbc:mysql://"+DBip+":"+DBport+"/"+DBname+"?"+"user="+DBusername+"&"+"password="+DBpasswd);

            System.out.println("Serververbindung steht");













        }catch (Exception e){


            System.out.println("--------------------------------              ");
            System.out.println("alles kaput");
            e.printStackTrace();
            System.out.println("SQLException: " + e.getMessage());

            System.out.println("--------------------------------              ");


        }
    }
}
















