How to use JDBC to get access to a database in a java program?

The Java program is to be used as an executable and placed in a bat file to be a schedued process. I do not know what type driver I should use. I'm thinking Type 3. Is that the correct way? The Type 3 driver where it is a native protocol where all java driver converts JDBC calls into a native DBMS protocol. Since this conversion takes place on the server side , no installation is required on the client machine. As a result will it be ok for me to acces this way. Can I get an example of connecting to a database using this approach.
I get confused whether a Ssession object is to be used or not. Also when I connect the server side, does that mean I can still use server-side java code in a program that is to be run as a batch job? I will make the connection into a class, then I will access the
database tables in another java program.
The code will be written in WebSphere. But does that mean I can still do a batch job that will be scheduled with a scheduler or an AT command?

I think you do not necessarily need a session object. I don t quite understand what you exactly want to achieve. Do you want to write a java application which changes something in your db an which can be accessed from the clients? This java application shall be started from a scheduler? This would be no problem no matter which ide you use (Websphere would be ok).

i use Websphere.
However, I have to write a java program as ascheduled process. I have to access three databases for the purpose of sending JavaMail to up to 11000 users. Most likely the number will be much smaller. A person will look at their records(images) and place an x in a checkbox. The scheduled java program will run at a specified time and look to see if an individul's records(images) have changed since they approved their records. If the records changed after approval, the individual receives a JavaMail stating their records have changed since they approved. This will all hapeen within a 40 day window.
Thank you for your time and patience. Being relativly new to java programming causes me confusion with respect to this project. Reason is:
I need to know how to connect to a database and how to access the database tables. I figured I should first learn how to connect, then acess some tables and prinln the data to see that process work first. Also I need to get the technicality out ot the way to run either preference 1 or 2 below
(Preference 1)
If I use WebSphere then what do I need to do to get the job running at aschedule time? And How do I get the job started to run the first time and continue to run? It seems that I would have to use a browser, if I schedule a process within webSphere. (Preference 2)
Can I schedule a batch job that is run within webSphere? If so How?
I'd like to perhaps run an executable from a bat file that is scheduled to run before dawn from a schedular. If so can I run a program bathwise that can connect thru WebSphere and also access the three databases. I do not understand if this can be done. I thought that if I use WebSphere sthedn I would have to use session objects or whatever. I don't see how I can uses session objects when I'm running a batch type program

0

Featured Post

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program.
Download Eclipse installation zip file:
Extract files from zip file:
Download and install JDK 8:
Open Eclipse and …

In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …