Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: how to connect sqlite3 with cipher type : WxSQLite3 ,Cipher : system.data.rc4 encrypted database and print the table column

  1. #1
    Junior Member
    Join Date
    Aug 2023
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation how to connect sqlite3 with cipher type : WxSQLite3 ,Cipher : system.data.rc4 encrypted database and print the table column

    I have tried this method but it creating new database in existing path folder and in result it printing there no such table:mytable.

    import java.sql.*;

    public class Database1 {

    public static void main(String[] args) throws SQLException {
    // Create a connection string
    String connectionString = "jdbc:sqlite:mydatabase.db;cipher=WxSQLite3;cipher _type=System.Data.RC4;key=mypassword";

    // Create a connection object
    Connection connection = DriverManager.getConnection(connectionString);

    // Create a statement object
    Statement statement = connection.createStatement();

    // Execute a query
    ResultSet resultSet = statement.executeQuery("SELECT * FROM mytable");

    while (resultSet.next()) {
    // Get the data from the result set
    String name = resultSet.getString("name");
    System.out.println(name);
    }


    // Close the connection
    connection.close();
    }
    }
    Last edited by shadowtechnology; August 25th, 2023 at 01:19 AM. Reason: explanation for this code i have given

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: how to connect sqlite3 with cipher type : WxSQLite3 ,Cipher : system.data.rc4 encrypted database and print the table column

    Also posted here: https://coderanch.com/t/776245/java/...-type-WxSQLite

    Please read: http://www.javaprogrammingforums.com...s-posting.html
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 1
    Last Post: March 5th, 2023, 07:31 PM
  2. Replies: 1
    Last Post: May 22nd, 2013, 07:48 PM
  3. Cipher Client/Server Encryption/Decryption Program - Please Help
    By drwatson in forum What's Wrong With My Code?
    Replies: 11
    Last Post: April 15th, 2013, 11:13 AM
  4. Replies: 2
    Last Post: June 4th, 2012, 11:40 PM
  5. Cipher Program
    By Shyamz1 in forum Object Oriented Programming
    Replies: 2
    Last Post: September 20th, 2011, 04:11 PM

Tags for this Thread