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
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)
}
}
 
wood burning stoves
 
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