java - Microsoft Access with JDBC: how to get the "caption" property of a given field? -
at work have deal several legacy databases stored in microsoft access format. 1 of informations need extract "caption" property of fields on given table.
if using vb script, quite easy, can see on code above:
set dao = server.createobject("dao.dbengine.36") set bd = dao.opendatabase(arquivo, false, false, ";pwd=password") set query = bd.openrecordset("select * table") = 0 query.fields.count - 1 on error resume next response.write query.fields(i).name & "=" & query.fields(i).properties("caption") & vblf next
how can achieve same results using jdbc? know resultsetmetadata class, , have method called getcolumnlabel(), should return caption property, that's not happening.
here our code in groovy:
resultset query = conexao.createstatement().executequery("select * table") metadata = query.getmetadata() (i = 1; < metadata.getcolumncount(); i++) { string columnname = metadata.getcolumnname(i) string label = metadata.getcolumnlabel(i) }
so here question: possible retrieve information using jdbc? if is, how?
this driver issue. try ms access jdbc driver. there list @ sun.
Comments
Post a Comment