简体   繁体   中英

Connecting to a DB2 database using Servlets

Hey I'm trying to connect to a DB2 database, by using Servlets (Using NetBeans right now) but I just can't find a useful example on the web, could someone help me?

Thank you so much for your time.

It's no different to connecting to a DB2 database without using a Servlet:)

A quick Google search came up with some documentation on using JDBC with DB2 . That page has some code examples that should get you started.

Essentially it's a matter of obtaining a Connection object using either the DriverManager or DataSource interfaces. Once you have that you can obtain Statements or PreparedStatements are you're good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM