- Start the registry editor (regedit.exe).
- Move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters.
- From the Edit menu, select New, DWORD value.
- Enter a name of Smb2 and press Enter.
- Double-click the new value and set to 0 to disable SMB 2. Set to 1 to enable.
- Reboot the machine.
public static ResultSet sqlread(String S){ ResultSet rs = null; try { // create a mysql database connection String myUrl = "jdbc:mysql://localhost:3306/firewall?zeroDateTimeBehavior=convertToNull"; Class.forName("com.mysql.jdbc.Driver"); Connection conn = DriverManager.getConnection(myUrl, "root", "Cns@54321"); Statement st = conn.createStatement(); // note that i'm leaving "date_created" out of this insert statement rs = st.executeQuery(S); } catch (Exception e) { System.err.println("Got an exception!"); System.err.println(e.getMessage()); } return rs; }
Comments
Post a Comment