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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
Connectionobject using either theDriverManagerorDataSourceinterfaces. Once you have that you can obtainStatementsorPreparedStatementsare you’re good to go.