Created
May 19, 2012 19:17
-
-
Save mariuz/2732054 to your computer and use it in GitHub Desktop.
new fdb firebird driver example :execute insert statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $ pip install fdb | |
# use this documentation for the moment http://www.firebirdsql.org/file/documentation/drivers_documentation/python/3.3.0/tutorial.html#connecting-to-a-database | |
import fdb as kinterbasdb | |
con = kinterbasdb.connect(dsn='/var/lib/firebird/2.5/data/rdbgraph.fdb', user='sysdba', password='masterkey') | |
cur = con.cursor() | |
# Execute the insert statement: | |
name="name" | |
facebook_id="facebook_id" | |
insert_query="INSERT INTO RDBGRAPH_NODES (NAME, FACEBOOK_ID,EMAIL,GOOGLE_ID,TWITTER_ID) VALUES ( ? , ?,'','','')" | |
cur.execute(insert_query,(name,facebook_id,)) | |
con.commit() | |
cur.close() |
Hello you need also python 64 so the extension can be compiled , for more help please ask on https://groups.yahoo.com/neo/groups/Firebird-Python/conversations/messages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Buenas Noches, haciendo pruebas de coneccion Firebird y Python no funciona con Win64 y Instalada Firebird64 bits.
Saludos