Good , morning ... I am trying to connect from an AS400 machine to a Paradox database .... to do this I use drive insert in Paradox_JDBC30.jar.
If I run the application in my Pc via Eclipse interface all is ok.
If I try to run from As400 I get this error : java.sql.SQLException: //192.168.20.9/SVRSictess/Dati doesn't exist!
This is the way in which I set up URL :
private String dbURL = "jdbc:paradox://///192.168.20.9/SVRSictess/Dati";
private String JDBCDriver = "com.hxtt.sql.paradox.ParadoxDriver";
conn = DriverManager.getConnection(dbURL, "", "");
Someone have some suggestion for me ?
There is some possibility to discover more about origin of that error ?
Thank a lot
Nalesso Antonio
Italy
|
1. Try JDBC url:
jdbc:access:/\\192.168.20.9\SVRSictess/Dati
In Java code, you can should use two \\ for every \.
2. Try SAMBA url to skip security issue.
|
Thanks for answer ....
It's not possible specify an URL with \ for this it's considered like a particular Escape , like in C language. So it result impossible create .class file.
About Samba , I don't find any documentation that this is supported by IBM in AS400, so I prefere not
What it's strange it that from a common Pc all function well ....
If it was related to some authority problem ... I hope that message will be differente or not ?
Thanks
Nalesso Antonio
|
>It's not possible specify an URL with \ for this it's considered like a particular
> Escape , like in C language. So it result impossible create .class file.
Two \\ can be used to specify a \, for instance jdbc:access:/\\192.168.20.9\SVRSictess\Dati should be
jdbc:access:/\\\\192.168.20.9\\SVRSictess\\Dati in Java code.
You can use the code to prove whether it's a security issue:
import java.io.*;
public class testDir {
public testDir() {
}
public static void main(String[] args) {
try{
String fileName="//192.168.20.9/SVRSictess/Dati ";
File file=new File(fileName);
System.out.println(fileName);
System.out.println("isDirectory: "+file.isDirectory());
System.out.println("isFile: "+file.isFile());
System.out.println("exists: "+file.exists());
}catch(Exception ioe){
System.out.println(ioe);
}
}
}
|