Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1438
  • Last Modified:

H2 with python

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
jazzIIIlove
Asked:
jazzIIIlove
  • 4
3 Solutions
 
ZberteocCommented:
Is it H2 or PostgresSQL you are trying to connect to?
0
 
jazzIIIloveAuthor Commented:
It is h2
0
 
ZberteocCommented:
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
 
ZberteocCommented:
This might be useful if you choose Postgess:

https://statyili.wordpress.com/2010/02/27/in-memory-db-h2-and-python/
0
 
ZberteocCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now