Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

H2 with python

Posted on 2016-07-15
6
Medium Priority
?
1,003 Views
Last Modified: 2016-09-23
Hi,

I have a h2 database that i need to manipulate with python 2.7.

I saw in google that this is indirectly possible by setting up a postgre sql instance but i didn't understand what i should do after installing postgre server.

Any help?

Br.
0
Comment
Question by:jazzIIIlove
  • 4
6 Comments
 
LVL 27

Expert Comment

by:Zberteoc
ID: 41714536
Is it H2 or PostgresSQL you are trying to connect to?
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 41724989
It is h2
0
 
LVL 27

Assisted Solution

by:Zberteoc
Zberteoc earned 2000 total points
ID: 41725001
Apparently Python doesn't have a H2 driver to be able to connect directly but there is a way to use Java ODBC driver from Python but you have to setup few things. Here is a module that will allow you to use a Java drive in order to connect to an H2 database. I have never used H@ but it is rare that Python doesn't have a module for a database product because if it did the way to work with it would be the same to any other db product.

https://pypi.python.org/pypi/JayDeBeApi/
0
 
LVL 27

Assisted Solution

by:Zberteoc
Zberteoc earned 2000 total points
ID: 41725007
This might be useful if you choose Postgess:

https://statyili.wordpress.com/2010/02/27/in-memory-db-h2-and-python/
0
 
LVL 27

Accepted Solution

by:
Zberteoc earned 2000 total points
ID: 41725010
I found a reference that say that the use the psycopg2 module in Python but then you have to setup the H2 to run in Psotgress mode:

https://pypi.python.org/pypi/psycopg2

You need to install that module in Python then setup H2 in postgress mode and then you should be able to connect to it.

http://queforum.com/postgresql/836561-postgresql-there-python-module-supports-h2-database-%5B-hold%5D.html
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question