wood burning stoves 2.0*
The moose likes Groovy and the fly likes How to get column datatype in groovy sql? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "How to get column datatype in groovy sql?" Watch "How to get column datatype in groovy sql?" New topic
Author

How to get column datatype in groovy sql?

Nazeer Ahammad
Ranch Hand

Joined: Feb 26, 2012
Posts: 43
hi all,

how to get column data types using groovy sql?


regards,
nazeer
Nazeer Ahammad
Ranch Hand

Joined: Feb 26, 2012
Posts: 43
i have used below code to resolve my problem

sql.rows(query) { meta ->
colDataType = (1..meta.columnCount).collect {
meta.getColumnTypeName(it)
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get column datatype in groovy sql?
 
Similar Threads
Learning Groovy
com.gargoylesoftware.htmlunit.ScriptException: TypeError: is not a function, it is undefined
How to print all the fields in a record
last record
Datatype issue while calling a Stored procedure from Groovy