rogelio uribe

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

Recent posts by rogelio uribe

Hi there:
I'm not clear at all, about the method Class.forName(), I'm trying to use it on my program, but I'm getting the error:
java.io.Exception: Bad Path: <describing PATH>

the code is:
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(java.lang.ClassNotFoundException e)
{
System.err.print("ClassNotFoundException: " + e.getMessage());
System.exit(1);
}

so, I'm not sure about the meaning of the argument to call this method.
Can anybody help?
Thanx
Hi there:
I'm developing some application with an odbc link. I'm still testing it on a stand-alone PC and everything runs fine.
Once I change the regular class, for an applet I'm getting some errors, so that the programs fails. Here are some lines of code:
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(java.lang.ClassNotFoundException e)
{
System.err.print("ClassNotFoundException: " + e.getMessage());
System.exit(1);
}

the line which includes forName("sun..."), is generating the error due to the argument enclosed in quotes, is prefixed by the path where i'm working on (the path where class file is located). I figured out going over the Java Console on my browser (IE). the error says:
com.ms.security.SecurityExceptionEx [method] Java.io.IOException: bad path: <my_current_working_directory>\sun\jdbc\odbc\JdbcodbcDriver.class
The thing is: why the program runs correctly as an application and fails as an applet?
The program is running on the same box where the dsn and database are defined.

Thanx for any help you can offer.
Rogelio
Cindy:
Could you please explain me a little bit more about "signed applet"?
I'm looking for an quick alternative, because I need to put this information online as soon as possible, but I made a big mistake forgeting the applet security stuff.
Thanx.
23 years ago
Thanx for sharing your "Thoughts", I've forgotten that little detail (My program is an applet).
Any ideas?

Originally posted by Peter Simard:
Just a thought here, but as applets can't access the disk directly, you'll need to go through some sort of interface. While i don't know how to implement this, i beleive a Java servlet would be a way to go.
Again, just a thought.
PAS


23 years ago
Hi there:
I must deal with a common text file on my program. When I runthe program on a PC, everything is fine, but once I put it on the web server (UNIX) I doesn't run.
Here is the line where I'm getting an error:
DataInput FileID = new DataInputStream(new FileInputStream("results.txt"));
The error is:
netscape.security.AppletSecurityException: security.checkread: Read of 'results.txt' not permitted
can anybody give a hint, please?
Roger
23 years ago
Hi there:
I'm writing a program for reading a text file. This file will be updated every minute.
The file is on a PC called 'X' and the program is going to be executed on a web server (a different machine).
At this moment, I'm hesitating about the most convenient alternative for the location of the file:
1) Transfer the file with ftp from X to the web server
2) Sharing the file on X, and reading remotely from the web server
If I choose option 1, I don't know how 'elegant' could it be.
On the other hand, if I select option 2, what can I do in order to get a reliable copy of the file (I mean, I neither refer to copy nor transfer the file), but in the meantime my program reads the file, this one could be being updated and I my program will get incomplete or inconsistent information. In addition to that, does Java allow reading a sharing file?, or has some restrictions about it?.
So, what I'm looking here is a hint about what can I deal with this stuff.
Thanx in advance,
Roger
23 years ago
Hi everybody:
I'm trying to set a remote configuration for my data source. The remote machine name is "harris", and the remote source data is defined like "History".
This information is what I know well, but the sintax to define a URL has some port stuff and I don't know what port number could be.
String url = "jdbc dbc://harris:<PORT_NUMBER>/Historico";
Any ideas?
Thank you.
Jack the Snack, thank you, I missed that point. Everything is running correctly.
Regards,
Roger
Hi there:
I'm testing some examples from the book "JDBC Database Access with Java", and I'm getting this error message when I try to run it:
SQLExpection:[Microsoft][Administrador de controladores ODBC]El nombre del origen de datos no se encontro y no se especifico ningun controlador predeterminado.
SQLExpection:[Microsoft][ODBC Drivers Administrator]The name of the data source was not found and a predeterminated driver was not especified.
The code of the program is:

import java.sql.*;

// Create the Coffee Table.
public class CreateCoffees {
public static void main(String args[]) {

String url = "jdbc dbc:CafeJava";
Connection con;
String createString;
createString = "create table COFFEES " +
"(COF_NAME varchar(32), " +
"SUP_ID int, " +
"PRICE float, " +
"SALES int, " +
"TOTAL int)";
Statement stmt;

try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
System.out.println("trying to connect"}"); /* after this line the error is generated. */
con = DriverManager.getConnection(url, "", "");
System.out.println("statement");
stmt = con.createStatement();
stmt.executeUpdate(createString);

stmt.close();
con.close();

} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}
}
The database "cafeJava.mdb", is located on the same source directory that this program. Can anybody help me, please?.
Thanks in advance.
Kiran, thank you very much, oyur answer help me a lot. I reach the tutorial and I'm going to focus on that.
regards,
Rogelio
Hi there:
At this moment, I'm trying to introduce myself into the database stuff using java, but what is not really crystal clear to me, is the JDBC matter. I mean, is different this software that the one included on JDK (my current version is 1.2.2)?, is not embedded at all on JDK?
I'm being browsing on java.son.com, but I couldn't find a jdbc software version for downloading, the different links just send me to pages for download a JDK, or SDK, something like that.
Please, if anybody can help me, Thanx in advance.
I'm looking for a method (if one of them exists) so that I can implement a tooltip text; I mean when you put the mouse over a point on the screen for a few consecutive seconds, a text message appears on the screen, showing some helpful information about that issue. Something like toolTipText in Visual Basic.
Any ideas?
23 years ago
Thank you for your help, I didn't even considered the idea about drawing a rectangle; that�s a good alternative.
23 years ago
I'm developing a little graphic application and I've been looking for any method that let me change the default width for the lines. I must combine different line width on the process. Does anybody can help me with this?
Thanks in advance.
23 years ago