Skip to content

Is there a way to open an existed data.mdb ? #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BeneficialCode opened this issue May 6, 2024 · 9 comments
Open

Is there a way to open an existed data.mdb ? #20

BeneficialCode opened this issue May 6, 2024 · 9 comments

Comments

@BeneficialCode
Copy link

I mean a python example to open a database.

@greenrobot
Copy link
Member

@BeneficialCode
Copy link
Author

I mean coding.

@greenrobot
Copy link
Member

Basically you need to go through here: https://github.com/objectbox/objectbox-python?tab=readme-ov-file#getting-started

But, where does the data.mbd come from? Microsoft Access also uses this .mdp file extension, but it has nothing to do with it.

@BeneficialCode
Copy link
Author

Actually, they are objectbox databases which in the objectbox directory. I find that they store in android application's files path. It includes data.mdb and lock.mdb.

@dh123321
Copy link

bro,i have a same question,do you solve it?

@BeneficialCode
Copy link
Author

Not yet : (

@greenrobot-team
Copy link
Member

greenrobot-team commented Nov 18, 2024

I find that they store in android application's files path. It includes data.mdb and lock.mdb.

@BeneficialCode There is no guarantee this works (due to differences in, for example, how numbers are stored), but you can open the database created by another ObjectBox library if you make sure your Python code uses the exact same model. You can verify this by checking if the generated model JSON is the same.

Side note: for anyone just looking to view the contents of an ObjectBox database file, use the Admin app.

@dh123321
Copy link

I find that they store in android application's files path. It includes data.mdb and lock.mdb.

@BeneficialCode There is no guarantee this works (due to differences in, for example, how numbers are stored), but you can open the database created by another ObjectBox library if you make sure your Python code uses the exact same model. You can verify this, if the generated model JSON is the same.

Side note: for anyone just looking to view the contents of an ObjectBox database file, use the Admin app.

Can I use python to generate a database file (data.mdb) and then open it on Android?

@greenrobot
Copy link
Member

Can I use python to generate a database file (data.mdb) and then open it on Android?

Yes, that should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants