Farooq Ali

Ranch Hand
+ Follow
since Sep 30, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

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);
}
setStart(start);
setEnd(end);
}
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
Thanks
Farooq
[email protected]
22 years ago
Thanks ppl
Now Can somebody shed a light on stored procedures for MS SQL server??
Farooq
Another question..
Can MS Ole-Db be used somehow instead of the standard ODBC/DSN technique?? to connect to a java program??
FArooq
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???
Farooq
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
Farooq
23 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??
Farooq
23 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;

try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("Jdbc:Odbc:scomm");
st = con.createStatement();
ResultSet rs = st.executeQuery(query);
while (rs.next())
{
demp_pw = rs.getString(1);
}

con.close();
}

catch(Exception e)
{
e.printStackTrace();
}

if(demp_pw.equals(tpw))
{
System.out.println("Password Correct");
}

else
System.out.println("Password incorrect");
System.out.println(demp_pw);
}
}
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?
Farooq
24 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
Thanks
Farooq
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
Farooq
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
24 years ago
Sharmila thats elemntary java thing....
MyBean mb = new myBean() //instantiated a MyBean typeobject
now mb.beanMethod()
I hope you this
24 years ago
thanks Cindy...
but still without JDBC how do I read MS EXcel files in my java program??
Farooq
24 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
Farooq
24 years ago