Farooq Ali

Ranch Hand
+ Follow
since Sep 30, 2000
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Farooq Ali

Hi guys I need some help tackling a problem.
I am trying to compare different date spans and then try to coalesce them (merge them)
this is the contructor of the DateSpan class I was provided with
public DateSpan(Date start, Date end)
throws IllegalArgumentException
if (end.before(start)) {
throw new IllegalArgumentException("End date " + end + " is before start date "
+ start);
these datespan object are then wrapped with another object and then put in a List.

Now for a certain object we can have different datspans.
If these date spans intersect or over lap I have to merge them all together and show just one DateSpan starting from earliest to the latest Date.
I would appreciate some input this
21 years ago
Thanks ppl
Now Can somebody shed a light on stored procedures for MS SQL server??
Another question..
Can MS Ole-Db be used somehow instead of the standard ODBC/DSN technique?? to connect to a java program??
Hello All
I want to insert a new record but the fields are spread on 3 different tables that is the entries in one table are linked to the other tables. Is there a way I can insert the data with one Insert query???
Hi all I am connecting to an excel file through JDBC which contains data in the folowwing format
[07/19/01 11:25] (UL, Good) k:\all backup's\consumer industry\uploaded pictures and pdfs\pdf uploaded\july 18 pdfs\427138.pdf --> /magma_pdf
[07/19/01 11:25] (UL, Good) k:\all backup's\consumer industry\uploaded pictures and pdfs\pdf uploaded\july 18 pdfs\222706.pdf --> /magma_pdf
Its a log file of an ftp server.
Now I want just pick the name of the file only not al the other info
I know its j
Apart from Bill's book which I found to be very good
try out another book
web development with JSP thats good as well
22 years ago
Hi everybody
can some one please tell me about the HttpSessionBinding Listener. & how can I use it in my project.
I am using a servlet which first verifies a user then gets info from a database regarding that user.
Afterwards pass that info to a couple of JSP files.
I had thought of using simple HttpSession object's setAttribute() & getAttribute() methods for the project.
I need some feedback whether I am going on the right track or not??
22 years ago
hello all...
I am developing a password verification servlet. Which takes in emplyee id & pw from users & authenticates them from the DB
but when I take the parameters from a web pae it gives me an error saying 405 resource not allowed
here is the code: this is just a test servlet I want to mdify it after it has done the authentication....
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class PWTest extends HttpServlet

String tpw ="";
String temp_id = "";
String query="";
String demp_id="";
String demp_pw="";
Connection con;
Statement st;

public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
temp_id = req.getParameter("emp_id");
tpw = req.getParameter("pw");
query = "Select emp_pw from Emp_PW where emp_id = "+temp_id;


con = DriverManager.getConnection("Jdbc:Odbc:scomm");
st = con.createStatement();
ResultSet rs = st.executeQuery(query);
while (rs.next())
demp_pw = rs.getString(1);


catch(Exception e)

System.out.println("Password Correct");

System.out.println("Password incorrect");
23 years ago
hi guys
I able populating a html table with records from an excel file connected to the servlet through JDBC-ODBC
but I get Null records at the end??
y is it getting blank records from the excel files?
23 years ago
Hi all
I am having problems connecting to Excel files through ODBC
my code compiles perfectly but when I run it gives me the following error:
java.sql.SQLException: [Microsoft][ODBC Excel Driver] Could not find installable ISAM.
please helpme out.
It happened to me once when I was using VB to connect to an excel file
I re-installed visual studio in which I check the ISAM tabs in the DATA access dir
if any body can help me out on this
hi guys...
Can anyone guide to how to connect to an excel file through JDBC-ODBC bridge.
I want to know what is written in the sql query instead of the tables
is this query right
"SELECT fruits from SHEET$1" where fruit is a column is sheet1
I know there are are a lot of post on this question in javaranch
can any one send the urls to those discussions....
thanks a lot
Hi All,
I need to create activex component that use data from MS Xecel files then use it in my java appl.
I have heard of a activeX-javabeans bridge..
I want to read data from a lot of excel files somewhere around 2000 files & then display some random records from thme in my java app
help will be appreciated
23 years ago
Sharmila thats elemntary java thing....
MyBean mb = new myBean() //instantiated a MyBean typeobject
now mb.beanMethod()
I hope you this
23 years ago
thanks Cindy...
but still without JDBC how do I read MS EXcel files in my java program??
23 years ago
sorry cindy I didn't get it
First of all how should I read from the excel files??
should it be like connecting thru jdbc & extracting the recods from all of the files??
I wan to simultaneously access somewhere like 10-15 separate excel files & treat them as one??
if I first read them thru jdbc & save the data its going to be quite cumbersome don't you think
please let me know
23 years ago