Majestics 84 Posting Pro

Hahaha You must be kidding , no body will read this much for you... Make a small demo so we start helping you. Atleast divide them in small task.

Majestics 84 Posting Pro

//opening Frame B

frameA.setVisible(false);
frameB = new JFrame();
frameB.setVisible(true);
//Or
frameB.setVisible(true);

// Closing Frame B

frameA.setVisible(true);
frameB.dispose();

Just remove your title bar from frame B and provide a close button.

Majestics 84 Posting Pro

Taking backup is a admin responsibility , i know this. But a small organization cant afford admin whose s/w is completely based on free software.. Taking backup of data even for a small shop is common now a days. So the organization where i m working cant afford a admin. :-)

Majestics 84 Posting Pro

NVL WORKED, but my problem isnt solved yet

Majestics 84 Posting Pro

100% Oracle Database...... :) I m making report which take all company name there purchase and sale SUMS and difference, some company can have no sale and purchase so atleast there name must be listed with 0 on both sale and purchase... Thats what all i want.

Majestics 84 Posting Pro
select companyname,sum(sale) as TotalSale,sum(purchase) as TotalPurchase from invoice group by companyname

I have already modified by query....

Also Nvl dont work.....

Majestics 84 Posting Pro

Please take my above query and place a outer join in correct manner....

Majestics 84 Posting Pro

Let me clear it i m making report

Majestics 84 Posting Pro

Following are the record
Company purchase sale
A 1 1
A 1 2
B 5 7

now the same above query will only show A and B company sale and purchase rest of companies values will be ignored and this is what i dont want.

Majestics 84 Posting Pro
select companyname,sum(sale) as TotalSale,sum(purchase) as TotalPurchase from invoice group by companyname

I used the above query to get the total sale and purchase belong to following company

A , B ,C ,D ,E ,F ,G

only A,C,E,G have sale and purchase value other have no sale or purchase record.

so I got A 12 13 ,C 12 15 , E 15 89 , G 14 89 but i want rest company to show 0 if there sum of sale or purchase are not present.

Majestics 84 Posting Pro

Yes u are right as always.... But what about my problem....

Majestics 84 Posting Pro

it will be very easy for us if u take two or three snapshot of your screen and load here.............

Majestics 84 Posting Pro

select companyname,sum(sale) as TotalSale,sum(purchase) as TotalPurchase from invoice group by companyname Having companyname IN (select companyname from invoice)

It returns sum only for those column whose all sum are not blank, how can i show blank sum values

I mean there are 7 companies but only 4 records are shown. I want to display all seven.

Majestics 84 Posting Pro

Found a hard way, but it will work.

Majestics 84 Posting Pro

Check thread through isAlive Method... and Run another when first finishes.

Majestics 84 Posting Pro

Click the Src package u have made, i think you must clicked some library and running the application....

Majestics 84 Posting Pro

Thanx Man....

Majestics 84 Posting Pro

It will be very kind if u post a sample script.... or just algorithm in post

Majestics 84 Posting Pro

thank you debasisdas for posting, i already tried that, i m using java to take backup of oracle.... I want user to take backup remotely from any computer.. For exp he must have oracle installed.... Any idea?

Majestics 84 Posting Pro

How to take a user table backup from that user account? I mean i want to give him grants to take backup... also query to take backup.

Majestics 84 Posting Pro

Is there any way to take oracle backup from java.

Connection c = // Connection Setting;
st = c.createStatement();
rs = st.executeQuery("//What to write here for backup");

I have tried imp and exp utility , but they cant be accessed through sqlplus...

Majestics 84 Posting Pro

Thank you peter.... I forget this thing.... It will solve my problem. And dont be angry dude........ Thanx again

Majestics 84 Posting Pro

1) We have a culture difference. I simply say thanx.
2) I already explained my all previous question. I got each one solution on different forums but not here i dont know why.... but still i like this forum i dont know the reason....
3) Yes u are right application already installed , just want to open the file.
4) :-)

Majestics 84 Posting Pro

Thanx for a great Lecture. Watch the attachment... I simply mean opening a file, like u open my computer in windows.

I have already created the file in c drive now i want to display it on the screen through java.

Majestics 84 Posting Pro

How to open already present text file... So user can see the data in that file... I dont mean FileInput or OutputStream open.

Majestics 84 Posting Pro
Majestics 84 Posting Pro

Finally its solved..........................................

Majestics 84 Posting Pro

1) start from jdk6 ...
2)Best Book: http://www.amazon.com/Java-Complete-Reference-Seventh-Osborne/dp/0072263857
3)Download Jdk From Here: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
4)Editor: Notepad or Notepad++ for starter, Eclipse and Netbeans for Advance User
5) Also for Api reference : http://download.oracle.com/javase/1.4.2/docs/api/overview-summary.html

Majestics 84 Posting Pro

Deal all, i am new to reports , i tried BIRT,JASPER,Crystal and oracle reports ... but i m only able to make a report in designer , how to connect to standalone application of java made in java se edition... So please tell me easy report designer because in vb or oracle or vc# connecting report is very easy but in java it doesnt seem this language can do this with that ease.

Majestics 84 Posting Pro
// First Define "a" outside addTab then add "a", Compiler cant recognize ram a
tab.addTab("RD",ram a);
// Its Listener
b1.addActionListeners(this);
//Implement Action Listener
class abc extends JPanel
{
public abc()
{
txt1=new JTextField(15);
b1=new JButton("submit");
b1.addActionListeners(this);
add(b1);
}
}
// JFrame is not visible to void main function , also u are using Jframe Extend then why a new JFrame.
JFrame frame

See some Java Program's.....

jason_joseph60 commented: thank u,i'l debug now +0
Majestics 84 Posting Pro

I agree with @jwenting.

Majestics 84 Posting Pro

re validate before repaint.
Google some example you will get it.

Majestics 84 Posting Pro

Can u please post what output u are expecting.... If you talking about the error , it is already solved...

Majestics 84 Posting Pro
import java.io.*;
import java.util.Arrays;
public class r
{
public static void main(String args[])
{
String st[]=new String[30];
int n,k;
String[] names =new String[30];
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
try
{
System.out.print("enter limit:");
n=Integer.parseInt(br.readLine());
for(int i=0;i<30;i++)
	names[i] = new String();
for(int i=0;i<n;i++)
{
names[i]=br.readLine();
}
Arrays.sort(names);
System.out.println(Arrays.toString(names));
}catch(IOException e){}
 
}
Majestics 84 Posting Pro

Check my post, i already solved your matter. At least i deserve a positive point. ;-)

Majestics 84 Posting Pro
for(int i=0;i<30;i++)
names[i] = new String();

You cant use things before initialzing....

Majestics 84 Posting Pro

Output can vary according to your computer's regional settings.

Majestics 84 Posting Pro

Anuradha, The problem was i wasnt using addRow.. But thanx to mKorbel it corrected. I already used Net Beans , Problem is visual tools dont provide enough controls so its better to code in case of performance matter s/w project's.

Majestics 84 Posting Pro
import java.util.Date;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;

    private String getDateTime() {
        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Date date = new Date();
        return dateFormat.format(date);
    }

Format Your Date Structure.

Majestics 84 Posting Pro

I am new for web desging , i want to learn desging, but dont know where to start from... Which tool is best for desging and easy also... any suggestion , comments will be appreciated.

Majestics 84 Posting Pro

I already explained that i cant post my emotion with my message, so using word "slapped" isnt nice.... second i dont want 24/7 service but i just want a single to the point reply ..... Again i cant post my emotion with my message.

Majestics 84 Posting Pro

I never imagined so much replies on a solved threads.... also -1 on asking help. ;-) Thanx mkorbel for a nice lecture. It is one of the best forum, but i think there isnt any professional who used reports with java before else i some one give me a small program to call reports from java for my previous thread responce. ;-)

Majestics 84 Posting Pro

I already solved it.......

Majestics 84 Posting Pro
ResultSet res1 = stat1.executeQuery ("insert into client (column names) values ('joker','Miraj',110)" );

Auto Number generated Automatically , insert row directly. MENTION column name in which you want to insert data.

Majestics 84 Posting Pro

Hello............ Any one there...................................................

Majestics 84 Posting Pro

And why are u calling loop 3 and 5 times....

Majestics 84 Posting Pro
import java.io.*;
     
    public class regform
    {
    public static void main(String args[])throws IOException
    {
    BufferedReader br= new BufferedReader (new InputStreamReader (System.in));
    String name = null,course = null,days = null,subject = null,section = null,time = null;
    int unit = 0,ID = 0;
    int ctr=0;
     
    for(ctr=0;ctr<3;ctr++)
    {
     
    System.out.print("\n Enter name: ");
    name=br.readLine();
    System.out.print("\n Enter ID: ");
    ID=Integer.parseInt(br.readLine());
    System.out.print("\n Enter course: ");
    course=br.readLine();
    System.out.print("\n Enter section: ");
    section=br.readLine();
     
    for(ctr=0;ctr<5;ctr++)
    {
     
    System.out.print("\n Enter subject: ");
    subject=br.readLine();
    System.out.print("\n Enter days: ");
    days=br.readLine();
    System.out.print("\n Enter time: ");
    time=br.readLine();
    System.out.print("\n Enter unit: ");
    unit=Integer.parseInt(br.readLine());
     
    }
    }
     
     
    for(ctr=0;ctr<3;ctr++)
    {
     
    System.out.print("\n " + name);
    System.out.print("\n " + ID);
    System.out.print("\n " + course);
    System.out.print("\n " + section);
     
     
    for(ctr=0;ctr<5;ctr++)
    {
     
    System.out.print("\n " + subject);
    System.out.print("\n " + days);
    System.out.print("\n " + time);
    System.out.print("\n " + unit);
    }
     
    }
     
     
    }

You Forget to intialize String var to null.

Majestics 84 Posting Pro
ORA-00001: unique constraint (WAJAHAT.INVOICE_UQ) violated

its the exception, i want to match it with condition and take decision , but its not working

if(e1.getMessage().equals("ORA-00001: unique constraint (WAJAHAT.INVOICE_UQ) violated"))
Majestics 84 Posting Pro
Majestics 84 Posting Pro
while(rs.next()){
jTable1.getValueAt(row, col);
row++;
col++;
 
}

WHAT ARE U DOING WITH IT?