TransPort_Tracking
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
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bestray.transtracking.views;
import com.bestray.transporttracking.DataSourceObject;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Properties;
import javax.sql.DataSource;
/**
*
* @author user2
*/
public class Backup {
private static ResultSet res;
private static Connection con;
private Statement st;
private DataSource ds;
public String getMysqlBinPath() {
try {
ds=DataSourceObject.getDataSourceObject();
con = ds.getConnection();
st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
} catch (Exception e) {
e.printStackTrace();
}
String a = "";
try {
res = st.executeQuery("select @@datadir");
while (res.next()) {
a = res.getString(1);
}
} catch (Exception eee) {
eee.printStackTrace();
}
a = a.substring(0, a.length() - 5);
a = a.replace("Data", "Files");
//System.out.println("Mysql path is :" + a);
return a;
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Sat 28 Jul, 2018 05:29:14 +0000 |
|