Scaladbc
Update
Scala DBC2 seems to be in a state of orphanage.
There are newer attempts in this space, such as, scala-query and orbroker, which are likely to give you better mileage.
Scala Data base connector version 2
The DBC library comes packaged along with Scala (Look under $(scala-distribution)/src/).
There's a newer, unreleased, version called DBC2 available here. But it appears to be unmaintained.
The download available as an attachment to this page is a simple fix to the above, to get it in a working shape.
Compilation
The source can be built with SBT
Demo
See the file demo/demo.scala inside the package. It shows how to create, update and query a Derby database (requires Apache Derby to be in the class path).
Acknowledgement
The original authors did all the work. I just fixed some typos and stuff.
page_revision: 6, last_edited: 1249620844|%e %b %Y, %H:%M %Z (%O ago)







Try to CRUD operation using dbc2 package, but couldn't execute queries because scala.dbc2.exception.ClosedException was thrown.
How do I execute some queries?
Best regards.
Hi rakuto,
I am not well versed with the scala DBC2 package. I just brought it to a state where it compiled. The run-time behaviour is a little difficult to understand.
Looking at the source code, it seems like a call to Vendor.closeConnection happens after every statement is executed. It's not clear to me how it is re-opened again.
I advise you ask on the scala mailing list for support.
Cheers,
HRJ
Hi,
I am also facing the same problem . I have searched for this on google no result. Is any solution for this problem….
Thanks in advance '
Sailaja.
I have added an update to the top of the page.
Please check out the other projects llisted there which are more likely to be stable.
Hi HRJ,
I am new to this word, scala and dbc.
I need bdc2 but dont know how to build with SBT package.
¿can you show me to configuration for do it?
Thanks very much
What about dbc2/dbc3 in Scala 2.8.
Will be included?
Where is the api doc for these libraries?
Thank very much
I am using scala lift . Also i using mysql to retrive the table value .
My doubt is ,
My query is —>val stmt4 = select ('id,'name) from('category) where 'name <>("'Contact'") and 'name <>("'Faq'")
printResults(db.executeStatement(stmt4.parse))
I want to display a id and name value .
def printResults(res: dbc2.result.Relation) {
for(val i <- res) {
for(val f <- i.fields) {
print("\t"+f.content.nativeValue)
}
println()
}
}
This code , f.content.nativeValue display value. i wnat how to extract id and name value.
send reply mail moc.liamg|5002ilarusnam#moc.liamg|5002ilarusnam