Guest User

Untitled

a guest
Jan 23rd, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. package bd
  2.  
  3. import com.kms.katalon.core.annotation.Keyword
  4.  
  5. import groovy.sql.Sql
  6.  
  7. public class conexion {
  8.  
  9. @Keyword
  10.  
  11. def conectar(String host, String port, String sid, String username, String password){
  12.  
  13. String connectionString
  14.  
  15. connectionString = "jdbc:oracle:thin:@" + host + ":" + port + ":" + sid
  16.  
  17. def sql = Sql.newInstance(connectionString, username, password)
  18.  
  19. try {
  20.  
  21. sql.eachRow("select a.cimsi, a.ciccid, b.cserial from tdatos_cliente a, tcliente b where a.qmovil=b.qmovil and a.qmovil='149083062'"){ row ->
  22.  
  23. println row
  24.  
  25. }
  26. } finally {
  27.  
  28. sql.close()
  29. }
  30.  
  31. }
  32.  
  33. }
Add Comment
Please, Sign In to add comment