Shoaib Khanzada

Greenhorn
+ Follow
since Mar 25, 2003
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 Shoaib Khanzada

Hi,
I have JTextArea and i want to print its text to the printer. Now in advance i dont know that how many pages will be there to print. It can be 1 or it can be 10. Please tell me how can i print multiple pages in java?
regards,
17 years ago
Hi,
I want to use XP style in my swing application. I can do it in c# but is it possible in java or not. If yes please give me little hint
thanks,
17 years ago
Hi,
I have loaded and xml document into DOM Object 'Document' now i want to change a node's value how can i do it?
yes it is the code for CustomerBean class. How u expect that it will come in CustomerHome dont u know the convention. Here i am giving u the convention always make beans to follow these conventions it will help u to manage ur code.
Home Interface = CustomerHome (Bean name follwed by Home)
Remote Interface = Customer (Just bean name)
Bean Class = CustomerBean (Bean name followed by Bean)
Client = CustomerClient (Bean name followed by Client)
I hope now u will get the idea so that is code and is implemented by ur bean class and this time the bean class is 'CustomerBean'
thanks
suppose it is ur callback method for creating customer instances.
But dont forget to create connection first. I hope it will be a good example for u. This time i am in hurry if u still find any problem post it here i will reply (inshaallah).
public String ejbCreate(String id, String name,
String address, String telephone){
try{
System.out.println("in ejbCreate()");
addCustomer(id, name, address, telephone);
}
catch(Exception e){
throw new EJBException(e.getMessage());
}
this.id = id;
this.name = name;
this.address = address;
this.telephone = telephone;
return id;
}
////////////////////DATABASE/////////////////////
public void addCustomer(String id, String name,
String address, String telephone)
throws SQLException{
String query = "INSERT INTO CUSTOMER VALUES(?, ?, ?, ?)";
PreparedStatement ps = connection.prepareStatement(query);
ps.setString(1, id);
ps.setString(2, name);
ps.setString(3, address);
ps.setString(4, telephone);
ps.executeUpdate();
ps.close();
}
HI,
u have to use runclient sript. i am writing here an examples of using that script.
suppose
MyApp.ear is ur enterprise archive file.
and MyAppClient.jar is ur client jar file.
c:\MyApp>runclient -client MyApp.ear -name MyClient -textauth
it will prompt u for user name and password use guest as user name and guest123 for password.
Hi all,
I want to give an option in my application to change the db password. i am using ms access 2000 file format .mdb db. How can i change password from java code?
thanks
and if access is installed then how can i compact my database
HI,
I want to compact msaccess db from java code. I am currently using access command line options /compact and executing command Runtime.exec() but it require that access should installed but i dont have access installed on my client machince how can i compact access db then
thanks
HI,
I want to compact msaccess db from java code. I am currently using access command line options /compact and executing command Runtime.exec() but it require that access should installed but i dont have access installed on my client machince how can i compact access db then
thanks