This file contains 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() |
No comments:
Post a Comment