-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqliteconnection.java
64 lines (51 loc) · 1.13 KB
/
sqliteconnection.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import java.sql.*;
import javax.swing.*;
public class sqliteconnection {
static Connection conn =null;
public static Connection dbconnector()
{
try{
Class.forName("org.sqlite.JDBC");
conn =DriverManager.getConnection("jdbc:sqlite:empoyee.sqlite");
conn.close();
conn =DriverManager.getConnection("jdbc:sqlite:empoyee.sqlite");
return conn;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, e);
JOptionPane.showMessageDialog(null, "kljdfklgj");
return null;
}
}
public static Connection workdbconnector()
{
try{
Class.forName("org.sqlite.JDBC");
Connection conn =DriverManager.getConnection("jdbc:sqlite:D:\\config.sqlite");
return conn;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, e);
return null;
}
}
public static void main(String []d){
Thread clock=new Thread()
{
public void run()
{
try {
for(;;)
{
System.out.println(9);
sleep(1/1000000);
}
} catch (InterruptedException e) {
}
}
};
clock.start();
}
}