0

import java.sql.*;

public class Main {
    private static final String url =
       "jdbc:firebirdsql://localhost:3050/C:/Users/Senko_KL/Desktop/base/LAWYERS_PORTAL.fdb?lc_ctype=WIN1251&user=sysdba&password=masterkey";

    public static void main(String[] args) throws SQLException {
        Connection connection = DriverManager.getConnection(url);
        Statement statement = connection.createStatement();
        ResultSet resultSet = statement.executeQuery("select * from lawyers-portal");
        while (resultSet.next()){
            System.out.println(resultSet);
        }
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.github.steed777</groupId>
    <artifactId>connectdatabase</artifactId>
    <version>1.0-SNAPSHOT</version>
    <dependencies>
        <dependency>
        <groupId>org.firebirdsql.jdbc</groupId>
        <artifactId>jaybird-jdk18</artifactId>
        <version>3.0.5</version>
        <exclusions>
            <exclusion>
                <groupId>javax.resource</groupId>
                <artifactId>connector-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>javax.resource</groupId>
        <artifactId>connector-api</artifactId>
        <version>1.5</version>
        <scope>provided</scope>
    </dependency>
    </dependencies>

</project>

вылезает ошибка:

Exception in thread "main" java.sql.SQLException: unsupported on-disk structure for file C:\USERS\SENKO_KL\DESKTOP\BASE\LAWYERS_PORTAL.FDB; found 24578.3, support 11.2 [SQLState:HY000, ISC error code:335544379]

пробовал разные версии firebird и разные зависимости, но безуспешно. версия firebird: 2.5.9.27139

1

1 ответ 1

0

Открывал базу данных сервером firebird, а нужно было redbase

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.