Jump to content

[Question] Internal.db


XML

Recommended Posts

Hello guys,

 I once heard that there is a way to connect to Internal.db,

And get/set values in it using: dbQuery - dbExec .. etc

I tried to get values in it, But i get this error: There is no such table called 'accounts'

So my question is, How to do it ?

Is there anyone did it before or knows how to do it ?

Edited by XML
Link to comment

Yes i know that, I know how to create a table and store or receive data,

But what i mean is, internal.db that contains userdata and accounts .. etc, The main database,

That you need to use set/getAccountData to store or receive data from it.

But i want to know how to connect to it and get all of the data using: dbQuery - dbExec

That's what i mean.

Link to comment
  • Moderators

hmm good quest. (to be honest never done it with the internal db, I did misread that part)

 

You should start with viewing the structure of the db itself, with for example this tool:

https://github.com/sqlitebrowser/sqlitebrowser

This will also tell you if the db is protected (or the data is protected) in anyway.

 

If everything is fine, then you should be able to connect with it the same way as with a regular db. If that doesn't work and yet your viewer does do the job, then you might need to convert the db to another version.

Edited by IIYAMA
Link to comment

I already have that tool and i opened the db with it, Without any problems.

But when i try to connect to internal.db, Debug says: There is no such table .. etc

So i tried to do: CREATE TABLE .. etc

And see if it'll work or not, It worked but it returns only 2 booleans (true).

It should return the data in the 'accounts' or 'userdata' or whatever table i want.

Link to comment

You can't access the internal.db from within Lua. You may only access .db files located in resources or in the 'global' database directory as described on the dbConnect wiki page.

The only way to connect to internal.db is to do it externally or make a module that will make it accessible. Another way could be to for example to use the FileSystem module and copy the internal.db to your resource's directory every once in a while. I'm not sure if you could access it directly using that module.

Edit: It's possible that a symbolic link would do the trick, that would most likely be the best solution.

Edited by MIKI785
Link to comment

You mean to do a shortcut of the internal.db ?

I already did that, And i got this error when i tried to do 'dbQuery': There is no such table .. etc

Edited by XML
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...