اذهب إلى المحتوى

Randa Kamal

الأعضاء
  • المساهمات

    1
  • تاريخ الانضمام

  • تاريخ آخر زيارة

كل منشورات العضو Randa Kamal

  1. can any one help me to solve this error on android studio java.sql.SQLNonTransientConnectionException: Could not create connection to database server my code Class.forName("com.mysql.cj.jdbc.Driver"); Connection connect=DriverManager.getConnection("jdbc:mysql://smartmysql.mysql.database.azure.com:3306/smartpark?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=GMT","username","password"); Statement stmt=connect.createStatement(); ResultSet rs=stmt.executeQuery("select * from parks"); while(rs.next()) System.out.println(rs.getString(1)+" "+rs.getInt(2)+" "+rs.getString(3)); connect.close(); }catch(Exception e) { System.out.println(e);}
×
×
  • أضف...