File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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?