Advertisement
rizqikq5

Simple SQL Connection

Jan 17th, 2019
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. @Throws(SQLException::class)
  2. fun DAL_Start_Open_Order(areacode: String){
  3. connectionClass = ConnectionClass()
  4.  
  5. try {
  6. val bIsSuccess = DAL_StartOpenOrder(areacode)
  7. if (!bIsSuccess!!){
  8.  
  9. }
  10. } catch (ex: Exception) {
  11. throw ex
  12. }
  13. }
  14.  
  15. @Throws(SQLException::class)
  16. fun DAL_StartOpenOrder(areacode: Any): Boolean? {
  17. connectionClass = ConnectionClass()
  18. var bIsSuccess: Boolean? = false
  19. val conn = connectionClass.CONN()
  20. try {
  21. val stmt = conn!!.createStatement()
  22. val rs = stmt.executeQuery("exec Sp_Drd_get_Req_apoved_list_by_periodate '" +
  23. areacode + "'"
  24. )
  25. while (rs.next()) {
  26. val datanum = HashMap<String, String>()
  27. mOrderStats.add(datanum)
  28. bIsSuccess = true
  29. }
  30. } catch (ex: Exception) {
  31. throw ex
  32. }
  33. return bIsSuccess
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement