1

Topic: Error at connection to DB Interbase through Java (Interclient)

Good afternoon.
I try to be connected to DB Interbase through Java (Interclient).
To a DB in which title there are no Russian characters, it is connected normally but if there is a DB, at which in a file title Russian letters the error takes off:

java.sql. SQLException: [interclient] [interbase] I/O error for file CreateFile (open) "D:/test/.ibs"
[interclient] [interbase] Error while trying to open file
null
at interbase.interclient.Connection.remote_ATTACH_DATABASE (Unknown Source)
at interbase.interclient. Connection.connect (Unknown Source)
at interbase.interclient. Connection. <init> (Unknown Source)
at interbase.interclient. Driver.connect (Unknown Source)
at java.sql. DriverManager.getConnection (DriverManager.java:664)
at java.sql. DriverManager.getConnection (DriverManager.java:208)
at Main.loadData (Main.java:47)
at Main.main (Main.java:20)

Than it to be treated?

2

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66 wrote:

Than it to be treated?

Usage of ways without Russian letters.

3

Re: Error at connection to DB Interbase through Java (Interclient)

It is a lot of bases in different folders it is already created with Russian titles.
It is necessary to solve this question program. Manually the big layer of operation.

4

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66 wrote:

it is a lot of bases in different folders it is already created with Russian titles.

That is they somehow worked till now?

5

Re: Error at connection to DB Interbase through Java (Interclient)

IBExpert to FB2.5 where the basis with Russian letters - connects normally.
in Interbase is? Can try to hide through them cyrillic.

6

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66;
Would specify, what InterBase and what InterClient. From any version InterClient it is torn off with JayBird from Firebird and if it works not through gds32.dll/ibclient64.dll there can be problems how it transfers DB file name to the server.

7

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66 wrote:

it is a lot of bases in different folders it is already created with Russian titles.
It is necessary to solve this question program.

Receive a short (8.3) way to basis through GetShortPathName () and use it. A short way
Does not contain Russian letters. Other way... Is, but it is necessary to change a spacer.

8

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66;
By the way, I take here InterBase 2017, the latest. In  I create D:/test/.ibs. Forms perfectly
(By the way, why this.ibs extension???).
The connection transits norms. So the reason, probably, in InterClient.

wrote:

That is they somehow worked till now?

Probably, earlier on Java wrote nothing.

fraks wrote:

Aliasy in Interbase is?

No. Is  on ports/instansam,  in understanding  is not present
http://docwiki.embarcadero.com/InterBas … _Databases

9

Re: Error at connection to DB Interbase through Java (Interclient)

Concerning the version :
InterClientVersion=12.0.0
InterClient (InterBase JDBC driver) for JRE 1.6.
Concerning versions of a DB of anything to tell ... I do not know as to look at the DB version interbase a file.
Here that I do:
1. I search for all files of the extension necessary to me and I receive an absolute path to a file

public class FindFiles {
private ArrayList <String> filesIbs = new ArrayList <> ();
public void start (String path) {
filesIbs.clear ();
//we view a folder and 
findFile (path);
}
private void findFile (String path)
{
File folder = new File (path);
//if the selected element is not readable is passed all actions
if (folder.canRead ()) {
//it is writeable all files and folders in an array
File [] filesAndDirectory = folder.listFiles ();
//it is passable on an array in search of new folders
for (File i: filesAndDirectory) {
if (i.isFile ()) {
if (i.getAbsolutePath ().endsWith (".ibs") &&! i.getAbsolutePath ().contains ("$"))
filesIbs.add (i.getAbsolutePath ());
}
//if the element i is a folder we launch a recursion
else
findFile (i.getAbsolutePath ());
}
}
}
public ArrayList <String> getFilesIbs () {
return filesIbs;
}
}

2. I am then connected to each found file where path an absolute path
Connection connection = DriverManager.getConnection ("jdbc:interbase://localhost /" + path, "SYSDBA", "masterkey");
Statement statement = connection.createStatement ();
Dimitry Sibiryakov how to receive a short way?

10

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66 wrote:

how to receive a short way?

To adjust .

11

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66 wrote:

how to receive a short way?

From "through GetShortPathName ()" you did not note what word?

12

Re: Error at connection to DB Interbase through Java (Interclient)

Dr66 wrote:

Dimitry Sibiryakov how to receive a short way?

It is possible so:
http://dolf.trieschnigg.nl/eightpointth … three.html