Skip to content

Instantly share code, notes, and snippets.

@mariuz
Created May 19, 2012 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mariuz/2732054 to your computer and use it in GitHub Desktop.
Save mariuz/2732054 to your computer and use it in GitHub Desktop.
new fdb firebird driver example :execute insert statement
# $ 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()
@gustavodiego01
Copy link

Buenas Noches, haciendo pruebas de coneccion Firebird y Python no funciona con Win64 y Instalada Firebird64 bits.
Saludos

@mariuz
Copy link
Author

mariuz commented Nov 25, 2019

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

@mariuz
Copy link
Author

mariuz commented Nov 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment