sharath kv

Greenhorn
+ Follow
since May 06, 2003
Merit badge: grant badges
For More
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 sharath kv

Hi,
I am searching like mad every where on the net to get this thing working,so
here I go again.
I have the following Oracle DB on my system.
Oracle version : 8.1.7.0.0
OS : Win2000 PE, 64MB RAM, PIII processor.
I searched in google.com and also in other Oracle forums.I found a few useful hints, which I tried and still the problem exists.
When I try to connect to the DB from Oracle forms 6i with just the
username and password I get the following error :
ORA-12203 : TNS : unable to connect to destination.
In one site it had mentioned that I provide the host string name as
that mentioned in the TNSNAMES.ORA file. I did that and got the following error :
ORA-12154 : TNS : Could not resolve service name.
I gave the service name as "home" as mentioned in my Oracle 8.1.7.0.0 ,TNSNAMES.ORA file, in the host string field of the forms 6i
connect dialog box. I got the following error :
ORA-12514 : Message 12514 not found: product=RDBMS80:facility=ORA
In an other site it had mentioned that I do the following:
1) Uninstall all Oracle products.
2) Install Oracle forms 6i first.
3) Then install Oracle 8.1.7.0.0 database.
I did the above steps as well, but still I am unable to connect to the DB
from forms 6i.
I would like to know what the format of "host string" is,in the username/
password dialog box.
Can anyone assist me with this issue with a detailed explanation.
thanks in advance
sharathkv.
20 years ago
Hi
I want to know how to make a dual boot system.
I am currently running Windows 2000 Professional Edition and have
two drives, drive C (C and drive D (D .
I have RedHat 7.3 Installation CDs. I want to install RedHat on drive D
and have a dual boot system.
Any help is appreciated.
20 years ago
Hi
I want to highlight the node of a Jtree
programaticlly.
I tried using this but it didn't work
mytree.setSelectionPath(treePath);
The treePath is displayed correctly in the
DOS prompt but the JTree is not highlighting
that last node of the treePath.
I tried this with no luck again
TreeNode[] treeN = mytree.getSelectionPath();
mytree.setSelectionPath(new TreePath(treeN));
I tried this also with no luck
mytree.scrollPathToVisible(treePath);
Any help would be appreciated
Thank you
20 years ago
Hi
I am trying to retrieve the edited value from the
cell of a JTable but I am getting the old value
itself.
My code is as follows:
public void mouseReleased(MouseEvent e)
{
int x = table.getSelectedRow();
int y = table.getSelectedColumn();
String value = table.getValueAt(x,y).toString();
System.out.println(" Old Value is : " + value);
if(table.isCellEditable(x,y))
{
table.editCellAt(x, y);
JTextField tf = (JTextField)table.getCellEditor().
getTableCellEditorComponent(table, value, true,x,y);
tf.selectAll();
tf.getCaret().setVisible(true);
Object new_value=table.getModel()
.getValueAt(x,y);
System.out.println("New Value is : " + new_value.toString());
} // END OF if(table.isCellEditable(x,y))
} // End of mouseReleased
20 years ago
Hi
The JTree node is highlighted only after the event is completed.I want to highlight the selected node as soon as it is selected and not after the event for the node selected is completed.
I am populating values from the database to the GUI after the node of a JTree is selected.If there
are large number of values,the time taken to load the values onto the GUI is approx 30-45 seconds,
during that time the selected node is not highlighted.Only after the values are loaded will
the selected tree node becomes highlighted.
Any suggestions??
20 years ago
Hi
I want to know how to stop the JComboBox from automatically executing the actionPerformed after the JComboBox items have been updated at runtime??
i,e the JComboBox items are refreshed after I click on a child node in a JTree.
For every click on a node in the JTree the JComboBox items are refreshed,but the actionPerformed event is also executing automatically. I need the JComboBox to wait for the user input after each refresh and not perform the event automatically as soon as it is refreshed.
20 years ago
Hi
I want to know 2 things
1) Adding JTextFields to a JPanel at runtime
2) Adding JTextFields to a JScrollPane at runtime
Both JPanel & JScrollPane have been added to the main GUI at compile time itself.
I need to add the JTextFields to the above 2 components at runtime.
Should I set the JPanel layout to null and set it's layout only at runtime with the JTextFields?
I have declared JPanel & JScrollPane at the beginning of the class as follows:
public static JPanel jp;
public static JScrollPane jsp;
I am using a lot of other files where data is constantly moving to & from them.So since I am creating the JPanel & JScrollPane in the beginning itself and adding them to other components,I am using the keyword static.
PROBLEM :

I want to just add the JTextFields to the JPanel
& JScrollPane at runtime.
20 years ago
I am getting the following exception :
Exception occurred during event dispatching:
java.lang.NullPointerException
at PaneDemo4.populate_cards(PaneDemo4.java:356)
at get_cards_details.Employee(get_cards_details.java:72)
at get_cards_details.<init>(get_cards_details.java:12)
at PaneDemo4$3.actionPerformed(PaneDemo4.java:290)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:870)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:417)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:455)
at javax.swing.plaf.basic.BasicComboPopup$ListMouseHandler.mouseR

I have the following code:
// GLOBALLY DECLARED IN THE CLASS ITSELF
JTextField cardsAttribNames[]
= new JTextField[13];
String str[]={"A","B","C","D"};
JTextField cardsTextField[][]
= new JTextField[13];
.
.
.
.
.
.
.
. // WITHIN A FUNCTION
for(int k=0;k<13;k++)
{
attribPanel.setLayout(new GridLayout(0,12));
cardsAttribNames[k] = new JTextField(10);
cardsAttribNames[k].setBackground(Color.cyan);
cardsAttribNames[k].setEditable(false);
attribPanel.add(cardsAttribNames[k]);
}
.
.
.
.
.
. // WITHIN A FUNCTION
for(int i=0;i<13;i++)
{
for(int j=0;j<13;j++)
{
comm_ports.setLayout(new GridLayout(12,12));
cardsTextField[i][j] = new JTextField(10);
comm_ports.add(cardsTextField[i][j]);
}
}
I am getting the following error when I try to
setText for the JTextFields as follows :
// WITHIN A FUNCTION(Have passed JTextFields as a parameter)

cardsAttribNames[0].setText(str[0]);
OR
cardsTextField[0][0].setText(str[0]);
Exception occurred during event dispatching:
java.lang.NullPointerException
at PaneDemo4.populate_cards(PaneDemo4.java:356)
at get_cards_details.Employee(get_cards_details.java:72)
at get_cards_details.<init>(get_cards_details.java:12)
at PaneDemo4$3.actionPerformed(PaneDemo4.java:290)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:870)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:417)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:455)
at javax.swing.plaf.basic.BasicComboPopup$ListMouseHandler.mouseR
20 years ago
Hi
I would like to know 2 things:
1) Is it possible to copy varchar2 type to a java host variable of type String in an
Anonymous PL/SQL in SQLJ.
Eg:
String var1; // Java String variable var1
String a;
String x;

try { // PL/SQL Block begins here
#sql {
DECLARE
b varchar2(2000);
msg varchar2(2000);
ret boolean;

BEGIN
ret:=di.func(:IN var1, UT a,msg);
b := UT a; //Unable to copy from a to b??
ret1:=ni.func2(:IN b, UT x,msg);
-- Unable to use :IN b i,e the output buffer
-- of the above procedure as input to
-- another procedure
END;
};
catch(SQLException e) { }
2) My Second question is
Looking at the above code how do I pass the OUT buffer returned from one procedure as input to another procedure.
Hi
I have 2 classes as follows:
public class A
{
String sv[] = new String[1000];
// Add values into sv.............
.........................
.........................
.........................
B k = new B(); // Call Class B
B.cards_output(sv); // invoke a method in Class B
} // End of Class A
public class B
{
// general declaration
public String copy_sv[] = new String[1000];
......
......
......
......
public void cards_output(String sv[]) // function in class B
{
for(int i=0;i<sv.length();i++)
{
copy_sv=sv;
}
}
} // End of Class B
I can only use copy_sv[] only in the functions that i pass that value to, I need copy_sv[] to be accessible everywhere in the program.
Now when ever I try to make a reference to copy_sv[] elsewhere in the program I am getting a Null pointer exception.
I tried using cloneable interface with clone method but again got a null pointer exception.
20 years ago
Hi
I have 2 classes as follows:
public class A
{
String sv[] = new String[1000];
// Add values into sv.............
.........................
.........................
.........................
B k = new B(); // Call Class B
B.cards_output(sv); // invoke a method in Class B
} // End of Class A
public class B
{
// general declaration
public String copy_sv[] = new String[1000];
......
......
......
......
public void cards_output(String sv[]) // function in class B
{
for(int i=0;i<sv.length();i++)
{
copy_sv=sv;
}
}
} // End of Class B
I can only use copy_sv[] only in the functions that i pass that value to, I need copy_sv[] to be accessible everywhere in the program.
Now when ever I try to make a reference to copy_sv[] elsewhere in the program I am getting a Null pointer exception.
I tried using cloneable interface with clone method but again got a null pointer exception.
20 years ago
Hi
I have 2 classes as follows:
public class A
{
String sv[] = new String[1000];
// Add values into sv.............
.........................
.........................
.........................
B k = new B(); // Call Class B
B.cards_output(sv); // invoke a method in Class B
} // End of Class A
public class B
{
// general declaration
public String copy_sv[] = new String[1000];
......
......
......
......
public void cards_output(String sv[]) // function in class B
{
for(int i=0;i<sv.length();i++)
{
copy_sv=sv;
}
}
} // End of Class B
I can only use copy_sv[] only in the functions that i pass that value to, I need copy_sv[] to be accessible everywhere in the program.
Now when ever I try to make a reference to copy_sv[] elsewhere in the program I am getting a Null pointer exception.
I tried using cloneable interface with clone method but again got a null pointer exception.
20 years ago
Hi,
I have a JTree with lots of parent nodes and children nodes of the parent nodes.Within one parent node I have many other parent nodes with and without children nodes.The parent nodes without children are displayed as leaf nodes,instead of being displayed as parent nodes itself.
I want to display parent nodes as parent nodes only even if it does not contain any children.
PLEASE HELP ME OUT IN THIS REGARD AS THIS IS A VERY CRUCIAL ELEMENT OF MY PROJECT.IF POSSIBLE PLEASE GIVE ME AN EXAMPLE.
THANK YOU
SHARATH
20 years ago
Hi
PROBLEM: A parent node is displayed as a child if the parent node contains no further childern.
I need to somehow stop the 2nd sql query from being processed if it returns no results.
1st SQL Query == For the parent nodes
2nd SQL Query == For the children of the above Query(1st SQL Query).
I have the SQLJ source as follows
// This function returns a JTree type.
JTree createTree() throws SQLException
{
int id_node =0;
int clli_node=0;
#sql { select count(*) into :id_node from groups};
#sql { select count(*) into :clli_node from nes};
DefaultMutableTreeNode[] nodes = new DefaultMutableTreeNode[id_node+clli_node];
// Set the Root Node
nodes[1]=new DefaultMutableTreeNode("Root");
JTree tree = new JTree(nodes[1]);
ID_iter id_it=null;
CLLI_iter clli_it=null;
String param=null;
// Select all parents
#sql id_it={select id,fdn,level from groups connect by prior
fdn=parent_fdn start with fdn='/' };
while(id_it.next())
{
int m = id_it.level();
if(m > 1)
{
String nameg = id_it.id();
nodes[m]=new DefaultMutableTreeNode(nameg);
nodes[m-1].add(nodes[m]);
}
param =id_it.fdn();
// Select all children based on the above parent
// Query
#sql clli_it={select clli from nes where parent_fdn= aram order by clli};
while(clli_it.next())
{
int n=id_it.level();
String name=clli_it.clli();
nodes[n+1] = new DefaultMutableTreeNode(name);
nodes[n].add(nodes[n+1]);
}
}
id_it.close();
clli_it.close();
return ( jtree );
}
20 years ago
Hi
PROBLEM: A parent node is displayed as a child if the parent node contains no further childern.
I need to somehow stop the 2nd sql query from being processed if it returns no results.
1st SQL Query == For the parent nodes
2nd SQL Query == For the children of the above Query(1st SQL Query).
I have the SQLJ source as follows
// This function returns a JTree type.
JTree createTree() throws SQLException
{
int id_node =0;
int clli_node=0;
#sql { select count(*) into :id_node from groups};
#sql { select count(*) into :clli_node from nes};
DefaultMutableTreeNode[] nodes = new DefaultMutableTreeNode[id_node+clli_node];
// Set the Root Node
nodes[1]=new DefaultMutableTreeNode("Root");
JTree tree = new JTree(nodes[1]);
ID_iter id_it=null;
CLLI_iter clli_it=null;
String param=null;
// Select all parents
#sql id_it={select id,fdn,level from groups connect by prior
fdn=parent_fdn start with fdn='/' };
while(id_it.next())
{
int m = id_it.level();
if(m > 1)
{
String nameg = id_it.id();
nodes[m]=new DefaultMutableTreeNode(nameg);
nodes[m-1].add(nodes[m]);
}
param =id_it.fdn();
// Select all children based on the above parent
// Query
#sql clli_it={select clli from nes where parent_fdn= aram order by clli};
while(clli_it.next())
{
int n=id_it.level();
String name=clli_it.clli();
nodes[n+1] = new DefaultMutableTreeNode(name);
nodes[n].add(nodes[n+1]);
}
}
id_it.close();
clli_it.close();
return ( jtree );
}