Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- try {
- inLine = new BufferedReader(new InputStreamReader(System.in));
- Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
- minConnection = DriverManager.getConnection
- ("jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=AnebyBank;user=sa;password=majlodj1;");
- stmt = minConnection.createStatement();
- System.out.println("Indtast ");
- System.out.println("1 for Opgave 1 ");
- String in=inLine.readLine();
- switch (in)
- {case "1" : {System.out.println("Mr.Perv in da mix");;break;}
- default : System.out.println("ukendt indtastning");
- }
- }
- catch (Exception e) {
- System.out.println("fejl: "+e.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement