metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arunkumar Pillai <arunkumar1...@gmail.com>
Subject Need Help in retrieving columns having NULL Values
Date Wed, 25 Nov 2015 04:59:09 GMT
Hi

I'm using select query to fetch records and my code is as follows

 val connection = DB.getConnection()
    val dataContext:DataContext =
DataContextFactory.createJdbcDataContext(connection)
     var query:Query =
dataContext.query().from("TABLE_NAME").select("COLUMN1").select("COLUMN2").toQuery


      val ds:DataSet= dataContext.executeQuery(query)

      while (ds.next()) {
        val row:Row= ds.getRow()
        val column1= row.getValue(0).toString
        val column2= row.getValue(0).toString

      }



if any of the value is NULL then it breaks there.  Any suggestions or help
would be highly appreciated.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message