Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4023650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:37:28+00:00 2026-05-20T10:37:28+00:00

Sorry about this question but i never worked with SQLite, and i gone through

  • 0

Sorry about this question but i never worked with SQLite, and i gone through the SQLite site , downloaded “Precompiled Binaries For Windows” files tried to make them usable for my purpose but i couldnot, i saw with working tutorials with databases,tables.

My tasks is to get data from SQLite and put them into magento mysql DB. So for that i have got the SQLite DB dump file as .db3 file, txt file which has size of db dump file(20110125_SIZE).

So how can i import it into the SQLite. Please if anyone of you worked with SQLite3 help me to understand the .db3 file and how can i see the records from them.

I have got sqlite3 db dump as dbname.db3,

So then i tried to connect this sqllite from php. Here is my sample code which i got it from forum.

    $db = openDatabase();   
    unset($db);

    function openDatabase() {
        $dbFile = realpath('dbname.db3');
        echo $dbFile . "\n";
        $needDbCreate = !file_exists($dbFile);
        $db = new SQLiteDatabase($dbFile) or die((file_exists($dbFile)) ? "Unable to open" : "Unable to create");
        if($needDbCreate) {

        }
        return $db;
    } 

But i am getting fatal exception.

Fatal error: Uncaught exception
‘SQLiteException’ with message
‘SQLiteDatabase::_construct() [sqlitedatabase.–construct]:
file is encrypted or is not a
database’ in
C:\wamp\www\SQLITE\index.php:23 Stack
trace: #0
C:\wamp\www\SQLITE\index.php(23):
SQLiteDatabase->
_construct(‘C:\wamp\www\SQL…’)
1 C:\wamp\www\SQLITE\index.php(15): openDatabase() #2 {main} thrown in
C:\wamp\www\SQLITE\index.php on line
23

But when i tried the same sqldump with the PDO , i got connected.

try {       
        $dbh = new PDO("sqlite:C:\wamp\www\SQLITE\dbname.db3");
        echo 'Db Connected <br/>';

    }
    catch(PDOException $e)
    {
        echo $e->getMessage();
    }

here i do not know the list of tables available in this dump so how can i query them to list and then getting records from them.

Please help me to solve this issue ti get connected and browse the tables from php.

Sorry for posting here in answer
section, i wanted to highlight the
code.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:37:29+00:00Added an answer on May 20, 2026 at 10:37 am

    On a system where SQLite is installed, you will usually also have the sqlite3 command line program. It can be used both from the command line or in interactive mode to dump data or load it into a (binary) database file.

    sqlite3 ./database.file
    

    This will give you the interactive prompt, where you can issue SQL commands or special commands such as .help or .dump.

    There are also more graphical tools, but they are probably overkill for what you want to do.

    Edit: seeing your reply (currently in the answer section), it seems that your .db3 file simply is not in the binary SQLite3 format, but instead perhaps a dump. That would be a problem. If it is a dump, you’d have to load it into a proper database file first.

    cat yourdump.sql|sqlite3 ./realdb.db3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for this not being a real question, but Sometime back i remember seeing
Sorry if this sounds like a really stupid question, but I need to make
Sorry about this silly question. I'm trying to learn objc and I'm unable to
This question has been asked before but 1) the user never accepted an answer
Sorry about the weird question title, but I don't really know what to call
Sorry about the vague subject but I couldn't think what to put. Here's my
Sorry for the second newbie question, I'm a developer not a sysadmin so this
Sorry for the basic question - I'm a .NET developer and don't have much
Sorry, I'm new to SVN and I looked around a little for this. How
Sorry for my ignorance here, but when I hear the word webserver, I immediately

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.