Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Kumar

Greenhorn
+ Follow
since Aug 23, 2004
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 Kumar

hi,
I have a doubt, as to whether is it possible to use multiple datasources in struts. If so then how do we communicate with different datsources through a client program written in struts.some example's may also be sent in this regard.

Kumar
Hi,
I have written a stored function in postgreSQL which returns a cursor and trying to access the records of the RecordSet using jdbc callable statements. The result is that it is not displaying anything and the resultset seems to be empty. kindly please guide me as how to approach to achieve the said task. My code looks like this

stored function
---------------
CREATE or REPLACE FUNCTION doQuery(refcursor) RETURNS refcursor AS '
DECLARE
ref refcursor;
BEGIN
open $1 for select * from test;
RETURN $1;
END;
' LANGUAGE plpgsql;

Client Application
------------------
private void listData() {
String cur_name="funccursor";
try {
CallableStatement cst = c.prepareCall("{?=call doQuery(?)}");
cst.registerOutParameter(1, Types.OTHER);
cst.setString(2,cur_name);
cst.execute();
rs = (ResultSet) cst.getObject(1);
while (rs.next()) {
log(rs.getString(1));
}
} //try
rs.close();
cst.close();
log("Records Retrieved Successfully");
} catch (SQLException sqle) {
log(sqle.getMessage());
log("Error while retrieving Records");
}

private void log(String mes){
System.out.println(mes);
}
Hi,
I have written a stored function in postgreSQL which returns a cursor and trying to access the records of the RecordSet using jdbc callable statements. The result is that it is not displaying anything and the resultset seems to be empty. kindly please guide me as how to approach to achieve the said task. My code looks like this

stored function
---------------
CREATE or REPLACE FUNCTION doQuery(refcursor) RETURNS refcursor AS '
DECLARE
ref refcursor;
BEGIN
open $1 for select * from test;
RETURN $1;
END;
' LANGUAGE plpgsql;

Client Application
------------------
private void listData() {
String cur_name="funccursor";
try {
CallableStatement cst = c.prepareCall("{?=call doQuery(?)}");
cst.registerOutParameter(1, Types.OTHER);
cst.setString(2,cur_name);
cst.execute();
rs = (ResultSet) cst.getObject(1);
while (rs.next()) {
log(rs.getString("name"));
}
} //try
rs.close();
cst.close();
log("Records Retrieved Successfully");
} catch (SQLException sqle) {
log(sqle.getMessage());
log("Error while retrieving Records");
}
I would like to know whether is it possible to use rtp with J2ME emulators for capturing and displaying streaming media, If so kindly guide as to how to implement it.

Kumar
13 years ago
Hi,
This is in addition to the topic: "Problem: Capturing real time media using J2ME", I would like to know as to how to implement the real protocol by extending the MMAPI in order to capture streaming Video transmited over network and render it onto the midlet. A Sample code provided could be of great help in this regard.

Kumar
13 years ago
Hi,
I'm new to using J2ME. i have been assigned a task to capture live video from a webcam attached to a Pc and transmit the same over the network and the resultant needs to be visible in an Emulator.
I have been able to capture, transmit and recieve media using JMF framework using RTP, but could not dot he same J2ME (Midlets). I request to kindly guide me through as to how i can approach in achieving the said task. Sample code bits may also be provided, if any in this regard.

Kumar.
13 years ago