This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

vernon mweetwa

Greenhorn
+ Follow
since Nov 26, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vernon mweetwa

hi all,

i am developing a program that needs to be used to search for employee details in our organisation. I would like either the firstname or the surname to be used as a search string. What i mean is if anyone wants to search for another person's details then they have to enter either the firstname or the surname to view their information.

How do i wrute a program that would iterate through the database and bring any records that would match the name provided by the user?

Your response will be highly appreciated.
Khan,

I totally agree with Avi on what he is saying, meaning the syntax of using certain key words like SELECT maybe different because of different vendors. Try to check on a simplified way of how Sybase uses the SELECT word and from there you will find the solution. It is rare to find the same SQL script running the same way on different databases without making a few changes to form to the new type of database.
Hi,

I would like to find out if there is a way of converting data that is stored in MySQL to Access 2003. This means transfering the whole database with its associated table from one form to another.

Youe response will be highly appreciated.
Hi,

below is a kind of query i need to run to get people that are late for picking drugs in the last 30 days. The first question mark is where the current date should be and the second question mark should be the current date minus 30 days. How do i fit these 2 dates in the query because what i have always learnt on queries is using values that are in the database but now i have to use values that are calculated in the code and are not any field in the database. How do i go about it?.

SELECT count( patient_id ) from master_patient " +
"WHERE first_drugs_dispensed >= ? " +
"AND first_drugs_dispensed < ? " );
Hi all,

i have a database of patients that has a field "Last Pharmacy Visit Date", that sores the date the patient last got medicine from the pharmacy. I would like to calculate how many days a patient is late when they don't come to get their medicine on time. The number of days late is calculated by the difference between the current date and the Last pharmacy visit date.

How do i write a query that will take the current system date as a parameter in the query and be able to give a count of how many patients in the database are 30 days or less late.

Your response will be highly appreciated.
hi,

I have a program that is used to generate a number of reports. The initial JSP has a number of combo boxes where a user chooses the type of report to generate, startdate and enddate.When the JSP is submitted, the main Action Servlet should now use case statement in determining which specific servlet to call so that execution happens and the result of this specific servlet be now forwarded to a JSP.This means that for every report selected, it has its own servlet to populate the result. in diagrammatic form i need to implement something like:

initial JSP- main action servlet- specific action servlet - final JSP.

How do i use the mapping.findForward method in the main servlet to forward to a specific servlet based on what kind of report has been chosen, so that that servlet can do the manipulation before results are sent to the final JSP.

Thanks
13 years ago
hi,

i have situatuation as follows and would like help. The index Jsp directs me to the home page. Now i have to options on the home page, which when i select one option and click on the button, this should take me to another Jsp. what type of code makes this happen? Even an example would do.

Thanks
13 years ago
JSP
Hi,

I would like to ask for any snippet of code that shows the use of Jfreechart within a servlet to generate graphics such as pie charts and bar charts e.t.c.

The servlet showed be able to connect to the database to get the dataset that has to be mapped on to a graph. At the moment, the code that i have makes use of hard coded dataset tp produce a graph and now that i would want is a situation where this data is got from the database to produce similar graphics.

Your quickest rsponse will be highly appreciated.
13 years ago
Hi all,

I need help on how to deactivate an option button. Lets assume you have 2 option buttons to a question, which are 'Yes' and 'No'. A user decides to click on one of them and later realises that this question should not infact be answered at all.

How do i deactivate the chosen option so that non of the choices is chosen now and therefore remains an unaswered question.
how now do i print that count from the method System.out.println().

thanks
HI ALL,

I would like to print the number of records from a resultset. What i have now prints the actual details from the database based on the query passed. below is the snippet of code that does that:

ResultSet rs =stmt.executeQuery("Select * from details");
while( rs.next()) {
System.out.print("\n"+rs.getString("firstname")+ " " +rs.getString ("surname"));

the question is how do i factor the above code so that instead of printing the actual details, it prints the number of records from the details table.

thanks
[ March 01, 2005: Message edited by: Mark Spritzler ]
Thank you Satishkumar for the help.

It worked.
13 years ago
JSP
Hi all,

i would like to make a JSP that a user can select both the month and year. the month and year selection should be made separately from the drop downs. initially these were option boxes and i was using 'html:radio' to create them.

now what word do i use to create drop downs.

your quickest response will be highly appreciated
13 years ago
JSP
Thanks Jeanne. I used 2 JDBC calls and it has worked.
I have a table called person, which has fields person number, name and age. I want a query which retrieves person details according to age group. i.e the program should be able to print people in the following age groups separately:

<25
25 - 30
31 -35
>35

This means that the query should be able to select people who are below 25 years and print them alone, followed by those of 25 to 30 years, followed by 32 to 35 years and finally those aged above 35 years from the same query.

how would be the query wriitten or just a snippet of it will do.
[ February 10, 2005: Message edited by: Bear Bibeault ]