seema kamath

Greenhorn
+ Follow
since Nov 27, 2000
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 seema kamath

Hi people,
How do I pass te contents of a stream directly to a printer?
I need some help urgently.Thanks in advance
seema kamath
20 years ago
Hello everybody,
I always wanted to create a mail server of my own. But i dont exactly know how to go about it.Can anybody help me out with a generalised idea.From where do I get some resources on this. Please help me .Thanks in advance

Seema
Hi Santosh,
Thanks for the reply.Iam sure i will have a nice day trying to design my own print preview.Thanks once again
Seema

Originally posted by santosh desai:
hi seema,
The printing classes of the Java platform do not supply a std "print preview" dialog.But it is easy to design ur own.
To construct a "PrintPreviewDialog",u supply either a "Printable" or a "Book",together with a "PageFormat" object.
Have a nice Day!!!
santosh


20 years ago
Hello everybody,
I'am new to swings and the print API.I would like to know whether there is a way by which i can see a print preview of the stuff i wanna print.Kindly help me.
Thanks in advance
Seema Kamath
20 years ago
Hello everybody,
We have a product existing in VisualFoxpro.We are now creating just one of its module in Java.We are using rmi and swings to accomplish the task. Now the requirement is to interact with the subroutines existing in VFP through Java.Can I use idl for Java and accomplish the same? Will i have to make some changes to the existing product in VFP. The only way i can think of calling the COM component existing there through Java is by taking the help of CORBA. Is there another way out.Can somebody guide me please?
Thanks in advance
:0
Seema Kamath
20 years ago
Hi to all java lovers,
Why does my code work fine when i comeent teh follwing in my program
// System.setSecurityManager(new RMISecurityManager());
Otherwise the very code is giving me Exceptions.Can somebody shed some light on this,please?
Thanks in advance
Seema Kamath
20 years ago
Can anybody tell me what are the situations in which i get the following exception
"Cant make two active database requests"
Please let me know. it is quite urgent.
thanks in advance
seema kamath
thank you, mr.Rao
seema kamath
Hello friends,
This requires some imeediate help.
Im working with inserting null values thru PreparedStatements. I want to set a Date field to null.The field is designed to accept null values.Any manual inserts doesnt give me problems but then when i try to insert null for this field through a PreparedStatement it gives me a NullPointerException or a Data Out of range
I have tried using setObject() method as well as setNull method.I waork with sqlserver7.0. i have tried this on ms acess also.
given below is the code
//******************************************************************

import java.sql.*;
public class Ins
{
public static void main(String a[])
{Connection con = null,con2=null;
PreparedStatement st= null;
int i=0;
String cust=" ";
Date d=null;
try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc dbc:NWind");
st=con.prepareStatement("Insert into Employees(LastName,FirstName,BirthDate) values(?,?,?)");
st.setString(1,"gaurav");
st.setString(2,"srivastava");
st.setObject(3,null,Types.DATE);
st.setNull(3,Types.DATE);
i=st.executeUpdate();
con.close();
System.out.println("Insert Success"+i+ " ");
}

catch(Exception e)
{
System.out.println(e);
}
}
}

//******************************************************************
PLEASE HELP ME AS THE SOLUTION IS REQUIRED AS SOON AS POSSIBLE.
THANKS A LOT FOR THE HELP
thanks asad,
it is working now.
seema kamath
20 years ago
Hello friends,
I have problems in my meagre effort to create a chat application.I have my files in c:\chat. They didnt bother me while compiling. Now i try to use rmic with the Server program(ie; indirectly implementing Remote ) and it says
unable to write class: X_stub.class
unable to write class: X_skel.class
where X is the name of my classfile
I compile under c:> by saying
rmic chat.MainClient and this is what gives the error.
i'am working under Windows98.
I dont know how to proceed.Can anybody please help???
Thanks a lot in advance.
Seema Kamath
20 years ago
Hello people,
I need some help on this.Im working with MS_Access and the database I'm using is the sample database called NorthWind. I have been successful with select and update statements but then i have problems with insertion.The code below works fine if i remove the comment on con.close().My question is why do i need to explicitly make a call to the connection's close() when i have a garbage collector running for me. I have tried using con= null instead of closing it but the record doesnt get inserted unless i close the connection. I know i can get problems with concurrent executions when i dont close a conncetion but here i'am unable to insert even for the first run of the program.Can,somebody clearly describe as to what is happening when i use a close() there?
I have also taken care of closing the database when executing this program
Here is the code
import java.sql.*;
public class Insert
{
public static void main(String a[])
{Connection con = null,con2=null;
Statement st= null;
ResultSet rs = null;
String cust=" ";
try
{
String id=" ";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc dbc:NWind");
st=con.createStatement();
String ls1="DADDY",ls2="polo";
String str= "insert into Customers(customerid,companyName) values (";
str+="'"+ls1+"','"+ls2+"')";
System.out.println(str);

int i=st.executeUpdate(str);

System.out.println("Insert Success"+i);
// I have commented the following line intentionally
//con.close();

}
catch(Exception e)
{
System.out.println(e);
}
}
}

Please help.Thanks in advance
seema kamath
hi harjit,
i think i can try helping u
There is this method called getMetaData() in Connection interface that gives you info about the database. call this method.This returns an object of DatabaseMetaData .
just say,
DatabaseMetaData dmeta= con.getMetaData();
//con in of Connection
The method getTables of DtabaseMetaData gives all the objects associated with a specific database
Say,
ResultSet rs= dmets.getTables(null,null,"%",null)
where the paramter 1 represesnts the schema
2 represents the catalog
3 represents the patterns of table desired
4 represents the types of tables(system,view,general etc
then iterate thru the resultset as usual and using the getSrting(n) where n is the column number get the appropriate name of the object.
this should do.and i hope i have solved your problem
And people,please free to correct me,if i'am wrong.
seema kamath
Thanks a lot for all the answers.I tried teh code given by Mr.Frank and i came to know that System.in is an object of BufferedInputStream.Thanks a lot for the information.
Mr.Maiilik tahnks a lot for answering me but I believe that it is System.out which is an object of PrintStream and not System.in.Since PrintStream helps you write to a destination It cannot be the class from which "in" is instantiated since "in" reads from a source.Please feel free to correct me if I'am wrong.
PS: I have changes my user name as well.
Thanks a lot to everybody involved with this site. It is too good.Extremely helpful for a beginner like me
Thank You
seema kamath
20 years ago