sunil virup

Greenhorn
+ Follow
since Aug 07, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sunil virup

Hi Folks,
I have recently started working on J2ME and picking up the basics..duirng which I have comeacross the following problem.I have a form with one command button.On click of this command button it takes u to another form and that form has another button..The problem is on click of the button on the second form where does the control go..is it necessary for me to add the commandlistener explicitly..please pitch in with your suggestions....here goes the code that I am executing
TIA
Sunil
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
import javax.microedition.io.*;

public class checkCommands extends MIDlet implements CommandListener
{
Form mainForm = new Form ("StockQuotes");
TextField symbolField = new TextField ("Symbol", "IBM", 5, TextField.ANY);
StringItem resultItem = new StringItem ("", "");
Command getCommand = new Command ("Get", Command.SCREEN, 1);
Display display = null;

public checkCommands()
{
mainForm.append (symbolField);
mainForm.append (resultItem);
mainForm.addCommand (getCommand);
mainForm.setCommandListener (this);
}

public void startApp ()
{
display = Display.getDisplay(this);
display.setCurrent (mainForm);
}

public void pauseApp ()
{ }

public void destroyApp (boolean unconditional)
{ }

public void commandAction (Command c, Displayable d)
{
String cLabel = c.getLabel();
System.out.println("Command :"+c);
System.out.println("Command Label :"+cLabel);
if(cLabel.equals("Get"))
{
Form getForm = new Form("Get Button");
Command cOK = new Command("Bidagain",Command.SCREEN,0);
getForm.addCommand(cOK);
display.setCurrent (getForm);

}
//First show the first form
}

public static void main(String args[])
{
new checkCommands().startApp();
}
}
22 years ago
Hello folks,
I have just started working with J2ME recently and was wondering how to manage double kind of datatypes..any help will be appreciated.By the way I heard there is float..can it help me in any way?
Please do pitch in with your suggestions.
TIA
Sunil
22 years ago
Hello All,
I recently downloaded a ODBC driver (17th Aug 2001 release) called LinkBook for QuickBooks. The driver when used with JAVA(JDK1.1.8 ) ie accessed using JDBC-ODBC Bridge works fine and allows me to acess data stored inside .QBW files of QuickBooks.

But when I try to run the same code using JDK1.3,it throws me an exception saying

"Exception in thread "main" java.sql.SQLException: The result set type is not supported.
at sun.jdbc.odbc.JdbcOdbcStatement.initialize(JdbcOdbcStatement.java:154)
at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:420)
at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:394)
at checkQuickBook.main(checkQuickBook.java:16)"
If any one has accessed QuickBooks .QBW files by any means using JAVA,I would like to hear from u.Kindly help me,its urgent.

here is the code that I have written.Kindly help me solve this problem.

CODE
----------------------------------------------------------------------------------------------------------------------------------
import java.sql.*;

public class checkQuickBook
{
public static void main(String args[]) throws Exception
{
String url = "jdbc dbc:myfirstlinktoquickbooks";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(url,"","");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM Budgets");//Budgets is a table in default DB that comes with QuickBooks
while(rs.next())
{
System.out.println(rs.getString(1));
}
}
}
Hi,
In your question u have mentioned that there is a digital certificate for each client.Can u tell me how were u able to authenticate the client from server (ie) how did u send the certificate to server for verification when the server demands for it(SSL3.0 where the server demands client authentication).we r also working on a similar project and will be greatfull if u can help us out.
Thank You

Hi everyone.
I have recently started working on SSL.All I did was configured my Tomcat4.0 to handle SSL by generating a certificate according to its specification.
But when I try to access "Https" through an application whose source code, I have given below I get "javax.net.ssl.SSLException: untrusted server cert chain"
Exception.Can any one please help me find a solution to this problem.
The code is
public class URLReader
{
public static void main(String[] args) throws Exception
{
String inputLine;
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
URL verisign = new URL("https://localhost:8443/");
BufferedReader in = new BufferedReader(new InputStreamReader(verisign.openStream()));
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
And also can any one help me to set up the Server ID that verisign gives free on trial basis on Tomcat4.0.
Expecting replies.
Bye
Sunil