dbk kumar

Greenhorn
+ Follow
since Feb 01, 2010
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by dbk kumar

how to terminate a client in between the client server communication(by socket programming) when some condition is met at server and that(server) sending a signal to terminate the client.... how do you go about it??
It would be of really great help if someone could help out..
Thank you in advance....
how to find character encoding used by my database and how to convert it to default character encoding?
thank you..


This is the code which runs perfectly alright when run alone...But when put inside my project code junk values get written into the file...
the data type stored in database which retreives the values are of varchar and interger type.
hi,
I have this code (which takes the column values from database table and writes into a file) which runs perfectly alright when run alone.But when I put this inside my big code which does some loads of database interactions and transfer through client and server this just fills in some garbage values(like series of rectangles) into my file....
But the code inside this big project code is the same..But why is this weird result??
Can anyone please tell me what precautions should I take in order to make this fit into my big code which also implements multi threading to cater to many clients...
Thank you in advance...
hi,
I have got a very confusing results when I run my client and server program through socket...

I have this code at the client,here the file name is printed after the System.out.println("rg2454ord"); statement....
This is very confusing...Can anyone please tell me how to achieve the synchronization...

fname=infromserver.readLine();
System.out.println(fname);
outtoserver.writeBytes("ack"+'\n');
System.out.println("rg2454ord");

and even there is mismatch between the communication...Some different lines get printed skipping some lines in between...
hey..thats working!!! great thank you very much
import java.sql.*;

public class tp{
public static void main(String[] args) {
try {
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

Connection conn = DriverManager.getConnection("jdbcracle:thin:@127.0.0.1:1521rcl","system","password");


Statement stmt = conn.createStatement();

String an="first";
System.out.println(an);

// a select query
ResultSet rset = stmt.executeQuery ("SELECT * FROM application where appname ='&an'");

while (rset.next()) {
System.out.println(rset.getString(1));
System.out.println(rset.getString(2));
System.out.println(rset.getString(3));
}

rset.close();
stmt.close();
conn.close();

} catch (Exception e) {
System.out.println("ERROR : " + e.getMessage());
}
}
}
this is the code which I tried to get the values from table application having appname='first' using a variable an but I failed... (this is just a part of server client simulation where you get the value 'first' from client which you assign to a variable 'an' in the server and try to access the database with variable 'an')
hi..
I am doing a jdbc program connecting a server and a client. I type in a value from client which is received by the server.Now the server reads in the value typed and stores in a variable. Now I use this variable to access the database(oracle 10g) with the help of select where clause which equates to a variable(not literal value that is there in table,but this variable has the literal value).But I am unable to fetch the result(which is accessed otherwise with a literal). how should I access the variable in the table.I tried &variable,$variable,@variable. but none really worked.
kindly reply back soon..
thank you in advance

Jan Cumps wrote:Hi Kumar,

Oracle FAQ documents the correct driver, depending on your database and java version.


THANK YOU
I am getting no suitable driver found jdbcracle:thin:@....
how to resolve this...
kindly help me out..
what to set for classpath,JAVA_HOME, ORACLE_HOME?? ( jdk1.6,oracle 10g database)
thanks in advance


What is the url required for the jdbc connection between Oracle 10g and JDK 1.6.

And just brief through the initial procedures to be done for the connection like changing the class path and etc..
Please reply fast...
Thanks in advance.!
I am getting the SQLRecoverableException: no more data to read from socket.

What might be the problem?